docstr: get zmq options by attribute
code: def __getattr__(self, key: str) -> OptValT:
      """get zmq options by attribute"""
      upper_key = key.upper()
      try:
          opt = getattr(constants, upper_key)
      except AttributeError:
          raise AttributeError(
              f"{self.__class__.__name__} has no such option: {upper_key}"
          ) from None
      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 in {errno.EINVAL, errno.EFAULT}:
                  raise AttributeError(f"{key} attribute is write-only")
              else:
                  raise
  
file_path: catboost/contrib/python/pyzmq/py3/zmq/sugar/attrsettr.py
imports: import errno
  from typing import TypeVar, Union
  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