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

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