@classmethod
def get_address(cls, address):
    """ Maps address to (host, port) tuple. """
    if not isinstance(address, (list, tuple)):
        addr = cls.ADDRESSES.get(address)
        if addr is None:
            raise ValueError('Unknown address mapping: {0}'.format(address))
        address = addr
    return address
