@staticmethod
def format(keys, value, _type):
    """
        General format function.

        >>> StatsdClient.format("example.format", 2, "T")
        {'example.format': '2|T'}
        >>> formatted = StatsdClient.format(("example.format31", "example.format37"), "2", "T")
        >>> formatted['example.format31'] == '2|T'
        True
        >>> formatted['example.format37'] == '2|T'
        True
        >>> len(formatted)
        2
        """
    data = {}
    value = '{0}|{1}'.format(value, _type)
    if not isinstance(keys, (list, tuple)):
        keys = [keys]
    for key in keys:
        data[key] = value
    return data
