def METHOD_NAME(self, name, callback):
    """Return the command proxy for the given callback.
    :param str name:
        Name of the command.
    :param callable callback:
        The callback that should be used to search the proxy.
    :raise ValueError:
        Raised if the proxy wasn't found.
    """
    for proxy in self._callback_proxies.get(name, ()):
        if proxy.callback == callback:
            return proxy
    raise ValueError('Unable to find a proxy for the given callback.')