code: def _get_classes(self, xml_document, src_path):
          
          # Remove git_root from src_path for searching the correct filename
          # If cwd is `/home/user/work/diff-cover/diff_cover`
          # and src_path is `diff_cover/violations_reporter.py`
          # search for `violations_reporter.py`
          src_rel_path = self._to_unix_path(GitPathTool.relative_path(src_path))
  
          # If cwd is `/home/user/work/diff-cover/diff_cover`
          # and src_path is `other_package/some_file.py`
          # search for `/home/user/work/diff-cover/other_package/some_file.py`
          src_abs_path = self._to_unix_path(GitPathTool.absolute_path(src_path))
  
          # cobertura sometimes provides the sources for the measurements
          # within it. If we have that we outta use it
          sources = xml_document.findall('sources/source')
          sources = [source.text for source in sources if source.text]
          classes = [class_tree
                     for class_tree in xml_document.findall(".//class")
                     or []]
  
          classes = (
              [clazz for clazz in classes if
               src_abs_path in [
                   self._to_unix_path(
                       os.path.join(
                           source.strip(),
                           clazz.get('filename')
                       )
                   ) for source in sources]]
              or
              [clazz for clazz in classes if
               self._to_unix_path(clazz.get('filename')) == src_abs_path]
              or
              [clazz for clazz in classes if
               self._to_unix_path(clazz.get('filename')) == src_rel_path]
          )
          return classes
docs: Given a path and parsed xml_document provides class nodes
          with the relevant lines
  
          First, we look to see if xml_document contains a source
          node providing paths to search for
  
          If we don't have that we check each nodes filename attribute
          matches an absolute path
  
          Finally, if we found no nodes, we check the filename attribute
          for the relative path