class_docstr: Create a zmq Context
  
  A zmq Context creates sockets via its ``ctx.socket`` method.
class_docstr_tok: ["Create","a","zmq","Context","A","zmq","Context","creates","sockets","via","its","``","ctx.socket","``","method","."]
docstr: Create a Socket associated with this Context.
  
  Parameters
  ----------
  socket_type : int
      The socket type, which can be any of the 0MQ socket types:
      REQ, REP, PUB, SUB, PAIR, DEALER, ROUTER, PULL, PUSH, etc.
  
  kwargs:
      will be passed to the __init__ method of the socket class.
docstr_tok: ["Create","a","Socket","associated","with","this","Context",".","Parameters","--","--","--","--","--","socket_type",":","int","The","socket","type",",","which","can","be","any","of","the","0MQ","socket","types",":","REQ",",","REP",",","PUB",",","SUB",",","PAIR",",","DEALER",",","ROUTER",",","PULL",",","PUSH",",","etc",".","kwargs",":","will","be","passed","to","the","__init__","method","of","the","socket","class","."]
code: def socket(self, socket_type, **kwargs):
      """Create a Socket associated with this Context.
  
      Parameters
      ----------
      socket_type : int
          The socket type, which can be any of the 0MQ socket types:
          REQ, REP, PUB, SUB, PAIR, DEALER, ROUTER, PULL, PUSH, etc.
  
      kwargs:
          will be passed to the __init__ method of the socket class.
      """
      if self.closed:
          raise ZMQError(ENOTSUP)
      s = self._socket_class(self, socket_type, **kwargs)
      for opt, value in self.sockopts.items():
          try:
              s.setsockopt(opt, value)
          except ZMQError:
              # ignore ZMQErrors, which are likely for socket options
              # that do not apply to a particular socket type, e.g.
              # SUBSCRIBE for non-SUB sockets.
              pass
      self._add_socket(s)
      return s
  
imports: import atexit
  import os
  from threading import Lock
  from weakref import WeakSet
  from zmq.backend import Context
  from .None import constants
  from .attrsettr import AttributeSetter
  from .constants import ENOTSUP, LINGER, ctx_opt_names
  from .socket import Socket
  from zmq.error import ZMQError
label_desc: Use image node_id 15 for calling the Context obj's underlying member method code with example usage: obj.socket(socket_type) and returns: s