code: def __parameter_descriptor(self, subfield_list):
      
      descriptor = {}
      final_subfield = subfield_list[-1]
  
      # Required
      if all(subfield.required for subfield in subfield_list):
        descriptor['required'] = True
  
      # Type
      descriptor['type'] = self.__field_to_parameter_type(final_subfield)
  
      # Default
      default = self.__parameter_default(final_subfield)
      if default is not None:
        descriptor['default'] = default
  
      # Repeated
      if any(subfield.repeated for subfield in subfield_list):
        descriptor['repeated'] = True
  
      # Enum
      enum_descriptor = self.__parameter_enum(final_subfield)
      if enum_descriptor is not None:
        descriptor['enum'] = enum_descriptor
  
      return descriptor
docs: Creates descriptor for a parameter using the subfields that define it.
  
      Each parameter is defined by a list of fields, with all but the last being
      a message field and the final being a simple (non-message) field.
  
      Many of the fields in the descriptor are determined solely by the simple
      field at the end, though some (such as repeated and required) take the whole
      chain of fields into consideration.
  
      Args:
        subfield_list: List of fields describing the parameter.
  
      Returns:
        Dictionary containing a descriptor for the parameter described by the list
            of fields.