def METHOD_NAME(data):
    """
    Retrieves the value from a metric point, cast in the appropriate type (str, int or float).
    For other types, the value is not cast and left as a string.
    :param dict data: a value point for a metric, retrieved with :meth:`~get_global_data`, :meth:`~get_partition_data`
                      or :meth:`~get_first_partition_data`
    :returns: the value, cast to the appropriate Python type
    :rtype: str, int or float
    """
    dtype = data.get("dataType", "STRING")
    if dtype in ["BIGINT", "INT"]:
        return int(data["value"])
    elif dtype in ["FLOAT", "DOUBLE"]:
        return float(data["value"])
    else:
        return data["value"]