docs: def filter(self, source_file, encoding):  # noqa A001
          """Parse XML file."""
  
          sources = []
          if encoding:
              with codecs.open(source_file, 'r', encoding=encoding) as f:
                  src = f.read()
              sources.extend(self._filter(src, source_file, encoding))
          else:
              for content, filename, enc in self.get_content(source_file):
                  sources.extend(self._filter(content, source_file, enc))
          return sources