from foo import foo as a, bar as b

# print(foo)
# NameError: name 'foo' is not defined

a()
# Foo text from module foo

b()
# Bar text from module foo

from foo import foo as a, bar as b

# print(foo)
# NameError: name 'foo' is not defined

a()
# Foo text from module foo

b()
# Bar text from module foo

# print(foo) # NameError: name 'foo' is not defined # Foo text from module foo # Bar text from module foo