def __field_to_parameter_type_and_format(self, field):
<EOL>variant = field.variant<EOL>if variant == messages.Variant.MESSAGE:<EOL><INDENT>raise TypeError('<STR_LIT>')<EOL><DEDENT>custom_variant_map = {<EOL>messages.Variant.DOUBLE: ('<STR_LIT>', '<STR_LIT>'),<EOL>messages.Variant.FLOAT: ('<STR_LIT>', '<STR_LIT:float>'),<EOL>messages.Variant.INT64: ('<STR_LIT:string>', '<STR_LIT>'),<EOL>messages.Variant.SINT64: ('<STR_LIT:string>', '<STR_LIT>'),<EOL>messages.Variant.UINT64: ('<STR_LIT:string>', '<STR_LIT>'),<EOL>messages.Variant.INT32: ('<STR_LIT>', '<STR_LIT>'),<EOL>messages.Variant.SINT32: ('<STR_LIT>', '<STR_LIT>'),<EOL>messages.Variant.UINT32: ('<STR_LIT>', '<STR_LIT>'),<EOL>messages.Variant.BOOL: ('<STR_LIT>', None),<EOL>messages.Variant.STRING: ('<STR_LIT:string>', None),<EOL>messages.Variant.BYTES: ('<STR_LIT:string>', '<STR_LIT>'),<EOL>messages.Variant.ENUM: ('<STR_LIT:string>', None),<EOL>}<EOL>return custom_variant_map.get(variant) or (variant.name.lower(), None)<EOL>
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.