code: def module_files(module, dependencies_dict=None):
      
      if dependencies_dict is None:
          dependencies_dict = dict()
      if hasattr(module, '__file__'):
          filename = module.__file__
          if filename not in dependencies_dict:
              realname, modified_time = _get_filename_and_modified(filename)
              if realname and realname not in dependencies_dict:
                  dependencies_dict[realname] = modified_time
                  for name in dir(module):
                      try:
                          item = getattr(module, name)
                          if hasattr(item, '__file__'):
                              module_files(item, dependencies_dict)
                          elif hasattr(item, '__module__'):
                              item = sys.modules[getattr(item, '__module__')]
                              if hasattr(item, '__file__'):
                                  module_files(item, dependencies_dict)
                      except (AttributeError, KeyError):
                          pass
      return dependencies_dict
docs: Scan a module and its entire dependency tree to create a dict of all files
      and their modified time.
  
      @param module: A <module> object
      @param dependencies_dict: Pass an existing dict to add only unscanned
          files or None to create a new file dict
      @return: A dict containing filenames as keys with their modified time
          as value