<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __field_to_parameter_type(self, field):
 """Converts the field variant type into a string describing the parameter. Args: field: An instance of a subclass of messages.Field. Returns: A string corresponding to the variant enum of the field, with a few exceptions. In the case of signed ints, the 's' is dropped; for the BOOL variant, 'boolean' is used; and for the ENUM variant, 'string' is used. Raises: TypeError: if the field variant is a message variant. """

    # 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 can\'t be used in a parameter.')

    custom_variant_map = {
        messages.Variant.SINT32: 'int32',
        messages.Variant.SINT64: 'int64',
        messages.Variant.BOOL: 'boolean',
        messages.Variant.ENUM: 'string',
    }
    return custom_variant_map.get(variant) or variant.name.lower()