How to Solve NameError: name 'agency' is not defined

Solution: Import the 'agency' module

# Add the following line to the top of your code
import agency

 

For more information:
Python agency