You cannot do this; globals are only ever looked up in the module the function is defined in.
You'd instead give your function a parameter that accepts u
as an argument:
def test(u):
number = u()+u()
return number
and in the main file:
def u():
bla = 1
return bla
test(u)
If Python worked the way you expected it to, you'd create many hard-to-trace problems, which namespaces (like modules) were meant to solve in the first place.