code: def set_class_attr(cls: Type, name: str, value: Any):
      """
      Set class attribute
  
      Unlike the builtin setattr, this function make sure that values that
      are functions/methods, that use super() will work on the class on
      which they are attached.
  
      Parameters
      ----------
      cls :
          Class on which to attach the attribute
      name :
          Name of attribute.
      value :
          The value to set he attribute to.
      """
      # When a method uses super(), the python compiler wraps that method as
      # a closure over the __class__ in which the method is defined. If a
      # function is a closure, we rebuild it with __class__ changed to the
      # class being attached to.
      if isinstance(value, FunctionType) and value.__closure__:
          value = FunctionType(
              value.__code__.replace(co_freevars=("__class__",)),
              value.__globals__,
              closure=(CellType(cls),),
          )
  
      setattr(cls, name, value)
  
label_desc: Use image node_id 2 for calling a global function with example usage: set_class_attr(cls, name, value) without return types