Create Hawkular-Metrics' submittable structure.

    :param metric_type: MetricType to be matched (required)
    :param metric_id: Exact string matching metric id
    :param data: A datapoint or a list of datapoints created with create_datapoint(value, timestamp, tags)

def create_metric(metric_type, metric_id, data):
    """
    Create Hawkular-Metrics' submittable structure.

    :param metric_type: MetricType to be matched (required)
    :param metric_id: Exact string matching metric id
    :param data: A datapoint or a list of datapoints created with create_datapoint(value, timestamp, tags)
    """
    if not isinstance(data, list):
        data = [data]

    return { 'type': metric_type,'id': metric_id, 'data': data }