<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_applicable_content_pattern_names(self, path):
 """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). """

    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