class_docstr: lazily provides Exception classes for each possible POSIX errno
  (as defined per the 'errno' module).  All such instances
  subclass EnvironmentError.
code: def _geterrnoclass(self, eno: int) -> type[Error]:
      try:
          return self._errno2class[eno]
      except KeyError:
          clsname = errno.errorcode.get(eno, "UnknownErrno%d" % (eno,))
          errorcls = type(
              clsname,
              (Error,),
              {"__module__": "py.error", "__doc__": os.strerror(eno)},
          )
          self._errno2class[eno] = errorcls
          return errorcls
  
file_path: catboost/contrib/python/pytest/py3/_pytest/_py/error.py
imports: from __future__ import annotations
  import errno
  import os
  import sys
  from typing import Callable
  from typing import TYPE_CHECKING
  from typing import TypeVar
label_desc: Use image node_id 2 for calling the ErrorMaker obj's underlying member method code with example usage: obj._geterrnoclass(eno) and returns: self, errorcls