def METHOD_NAME(self):
    if self.closed or self._failed_init or self.zmq_msg is None:
        return
    self.closed = True
    rc = C.zmq_msg_close(self.zmq_msg)
    C.free(self.zmq_msg)
    self.zmq_msg = None
    if rc != 0:
        _check_rc(rc)