class_docstr: Wrapper around IOPub thread that provides zmq send[_multipart]
class_docstr_tok: ["Wrapper","around","IOPub","thread","that","provides","zmq","send","[","_multipart","]"]
code: def __setattr__(self, attr, value):
      if attr == "io_thread" or (
          attr.startswith("__" and attr.endswith("__"))
      ):
          super(BackgroundSocket, self).__setattr__(attr, value)
      else:
          warnings.warn(
              "Setting zmq Socket attribute %s on BackgroundSocket"
              % attr,
              DeprecationWarning,
              stacklevel=2,
          )
          setattr(self.io_thread.socket, attr, value)
  
imports: from __future__ import print_function
  import atexit
  from binascii import b2a_hex
  from collections import deque
  import os
  import sys
  import threading
  import warnings
  from io import StringIO, TextIOBase
  import zmq
  from zmq.eventloop.ioloop import IOLoop
  from zmq.eventloop.zmqstream import ZMQStream
  from jupyter_client.session import extract_header
  from ipython_genutils import py3compat
  from ipython_genutils.py3compat import unicode_type
label_desc: Use image node_id 3 for calling the BackgroundSocket obj's underlying member method code with example usage: obj.__setattr__(attr, value) without return types