code: def get_directory_modules(directory):
      
      if _local_modules and os.path.dirname(_local_modules[0][1]) == directory:
          return _local_modules
  
      if not os.path.isdir(directory):
          # example/import_test_project/A.py -> example/import_test_project
          directory = os.path.dirname(directory)
  
      if directory == '':
          return _local_modules
  
      for path in os.listdir(directory):
          if _is_python_file(path):
              # A.py -> A
              module_name = os.path.splitext(path)[0]
              _local_modules.append((module_name, os.path.join(directory, path)))
  
      return _local_modules
docs: Return a list containing tuples of
      e.g. ('__init__', 'example/import_test_project/__init__.py')