Nonlocality basically means that the universe has a global RNG state. If you write some code that uses a global RNG and no other global variables, that code will still be "local" in the sense that functions cannot communicate information between each other using the RNG. But the outcomes of the functions might still be correlated in interesting ways (corresponding to entanglement).