@staticmethod
def create_identity(metric):
    """Creates a deterministic hashable identity for a metric

        :param metric: A New Relic metric object
        :type metric: newrelic_telemetry_sdk.metric.Metric

        >>> from newrelic_telemetry_sdk import GaugeMetric
        >>> foo_0 = GaugeMetric('foo', 0, tags={'units': 'C'})
        >>> foo_1 = GaugeMetric('foo', 1, tags={'units': 'C'})
        >>> MetricBatch.create_identity(foo_0) == MetricBatch.create_identity(foo_1)
        True
        """
    tags = metric.tags
    if tags:
        tags = frozenset(tags.items())
    identity = type(metric), metric.name, tags
    return identity
