docstr: set zmq options by attribute
code: def __setattr__(self, key: str, value: OptValT) -> None:
      """set zmq options by attribute"""
  
      if key in self.__dict__:
          object.__setattr__(self, key, value)
          return
      # regular setattr only allowed for class-defined attributes
      for cls in self.__class__.mro():
          if key in cls.__dict__ or key in getattr(
              cls, "__annotations__", {}
          ):
              object.__setattr__(self, key, value)
              return
  
      upper_key = key.upper()
      try:
          opt = getattr(constants, upper_key)
      except AttributeError:
          raise AttributeError(
              f"{self.__class__.__name__} has no such option: {upper_key}"
          )
      else:
          self._set_attr_opt(upper_key, opt, value)
  
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 1 for calling the AttributeSetter obj's underlying member method code with example usage: obj.__setattr__(key, value) without return types