'Convert python-style value type to enum-based value type.'

@staticmethod
def ValueTypeToMetricValueType(value_type):

    if (value_type in (int, long)):
        value_type = MetricMetadata.ValueType.INT
    elif (value_type == str):
        value_type = MetricMetadata.ValueType.STR
    elif (value_type == float):
        value_type = MetricMetadata.ValueType.FLOAT
    else:
        raise ValueError(('Unknown    value    type:    %s' % value_type))
    return value_type
