docstr: get zmq options by attribute
docstr_tok: ["get","zmq","options","by","attribute"]
code: def __getattr__(self, key):
      """get zmq options by attribute"""
      upper_key = key.upper()
      try:
          opt = getattr(constants, upper_key)
      except AttributeError:
          raise AttributeError(
              "%s has no such option: %s"
              % (self.__class__.__name__, upper_key)
          )
      else:
          from zmq import ZMQError
  
          try:
              return self._get_attr_opt(upper_key, opt)
          except ZMQError as e:
              # EINVAL will be raised on access for write-only attributes.
              # Turn that into an AttributeError
              # necessary for mocking
              if e.errno == errno.EINVAL:
                  raise AttributeError(
                      "{} attribute is write-only".format(key)
                  )
              else:
                  raise
  
imports: import errno
  from .None import constants
label_desc: Use image node_id 3 for calling the AttributeSetter obj's underlying member method code with example usage: obj.__getattr__(key) and returns: self