code: def generate_cache(self, resources=None, underlined=None,
                         task_handle=taskhandle.NullTaskHandle()):
          
          if resources is None:
              resources = self.project.get_python_files()
          job_set = task_handle.create_jobset(
              'Generatig autoimport cache', len(resources))
          for file in resources:
              job_set.started_job('Working on <%s>' % file.path)
              self.update_resource(file, underlined)
              job_set.finished_job()
docs: Generate global name cache for project files
  
          If `resources` is a list of `rope.base.resource.File`\s, only
          those files are searched; otherwise all python modules in the
          project are cached.