code: def find_occurrences(self, resource=None, pymodule=None):
          
          tools = _OccurrenceToolsCreator(self.project, resource=resource,
                                          pymodule=pymodule, docs=self.docs)
          for offset in self._textual_finder.find_offsets(tools.source_code):
              occurrence = Occurrence(tools, offset)
              for filter in self.filters:
                  result = filter(occurrence)
                  if result is None:
                      continue
                  if result:
                      yield occurrence
                  break
docs: Generate `Occurrence` instances