code: def __field_to_parameter_type_and_format(self, field):
      
      # We use lowercase values for types (e.g. 'string' instead of 'STRING').
      variant = field.variant
      if variant == messages.Variant.MESSAGE:
        raise TypeError('A message variant cannot be used in a parameter.')
  
      # Note that the 64-bit integers are marked as strings -- this is to
      # accommodate JavaScript, which would otherwise demote them to 32-bit
      # integers.
  
      return CUSTOM_VARIANT_MAP.get(variant) or (variant.name.lower(), None)
docs: Converts the field variant type into a tuple describing the parameter.
  
      Args:
        field: An instance of a subclass of messages.Field.
  
      Returns:
        A tuple with the type and format of the field, respectively.
  
      Raises:
        TypeError: if the field variant is a message variant.