code: def __init__(
      self,
      func_name: str,
      idempotent: bool,
      identity_of: Callable,
  ) -> None:
      try:
          self.func = getattr(cupy, func_name)
          self.numpy_func = getattr(numpy, func_name)
      except AttributeError:
          raise RuntimeError("No such function exists")
  
      self.idempotent = idempotent
      self.identity_of = identity_of
  
file_path: cupy/cupyx/distributed/array/_modes.py
imports: import functools
  from typing import Callable, Final, Optional
  import numpy
  import cupy
label_desc: Use image node_id 1 to create a new _OpMode object  with example: obj = _OpMode(func_name, idempotent, identity_of)