def METHOD_NAME(self, obj, send=True):
    # type: (Any, bool) -> None
    """Patch this pin onto the given object. If send is true, it will also
    queue the metadata to be sent to the server.
    """
    # Actually patch it on the object.
    try:
        if hasattr(obj, "__setddpin__"):
            return obj.__setddpin__(self)
        pin_name = _DD_PIN_PROXY_NAME if isinstance(obj, wrapt.ObjectProxy) else _DD_PIN_NAME
        # set the target reference; any get_from, clones and retarget the new PIN
        self._target = id(obj)
        return setattr(obj, pin_name, self)
    except AttributeError:
        log.debug("can't pin onto object. skipping", exc_info=True)