def METHOD_NAME(self, node=None, host=None, port=None):
    if node:
        if any((host, port)):
            raise ValueError("Don't pass host and port if you are passing the node.")
        mock_client = self._get_mock_client_by_ursula(node)
    elif all((host, port)):
        node = self._get_ursula_by_port(port)
        mock_client = self._get_mock_client_by_port(port)
    else:
        raise ValueError("You need to pass either the node or a host and port.")
    host, port = node.rest_interface.host, node.rest_interface.port
    return host, port, mock_client