code: def get_applicable_content_pattern_names(self, path):
      
      encodings = set()
      applicable_content_pattern_names = set()
      for path_pattern_name, content_pattern_names in self._required_matches.items():
        m = self._path_matchers[path_pattern_name]
        if m.matches(path):
          encodings.add(m.content_encoding)
          applicable_content_pattern_names.update(content_pattern_names)
      if len(encodings) > 1:
        raise ValueError('Path matched patterns with multiple content encodings ({}): {}'.format(
          ', '.join(sorted(encodings)), path
        ))
      content_encoding = next(iter(encodings)) if encodings else None
      return applicable_content_pattern_names, content_encoding
docs: Return the content patterns applicable to a given path.
  
      Returns a tuple (applicable_content_pattern_names, content_encoding).
  
      If path matches no path patterns, the returned content_encoding will be None (and
      applicable_content_pattern_names will be empty).