'Map addresses to replacement addresses. Tor replaces subseqent connections
to the original addresses with the replacement addresses.
If the original address is a null address, i.e., one of \'0.0.0.0\', \'::0\', or
\'.\' Tor picks an original address itself and returns it in the reply. If the
original address is already mapped to a different address the mapping is
removed.
:param dict mapping: mapping of original addresses to replacement addresses
:raises:
* :class:`stem.InvalidRequest` if the addresses are malformed
* :class:`stem.OperationFailed` if Tor couldn\'t fulfill the request
:returns: **dict** with \'original -> replacement\' address mappings'

def map_address(self, mapping):

    mapaddress_arg = '    '.join([('%s=%s' % (k, v)) for (k, v) in list(mapping.items())])
    response = self.msg(('MAPADDRESS    %s' % mapaddress_arg))
    stem.response.convert('MAPADDRESS', response)
    return response.entries
