code: def __get_path_parameters(self, path):
      
      path_parameters_by_segment = {}
      for format_var_name in re.findall(_PATH_VARIABLE_PATTERN, path):
        first_segment = format_var_name.split('.', 1)[0]
        matches = path_parameters_by_segment.setdefault(first_segment, [])
        matches.append(format_var_name)
  
      return path_parameters_by_segment
docs: Parses path paremeters from a URI path and organizes them by parameter.
  
      Some of the parameters may correspond to message fields, and so will be
      represented as segments corresponding to each subfield; e.g. first.second if
      the field "second" in the message field "first" is pulled from the path.
  
      The resulting dictionary uses the first segments as keys and each key has as
      value the list of full parameter values with first segment equal to the key.
  
      If the match path parameter is null, that part of the path template is
      ignored; this occurs if '{}' is used in a template.
  
      Args:
        path: String; a URI path, potentially with some parameters.
  
      Returns:
        A dictionary with strings as keys and list of strings as values.