code: def _set_unary(base, name: str, op: Callable[[Any], Any]) -> None:
      def fn(self):
          return ω(
              jtu.tree_map(op, self.ω, is_leaf=self.is_leaf),
              is_leaf=self.is_leaf,
          )
  
      fn.__name__ = name
      fn.__qualname__ = base.__qualname__ + "." + name
      setattr(base, name, fn)
  
imports: import operator
  from collections.abc import Callable
  from typing import Any, Optional, TYPE_CHECKING
  import jax
  import jax.tree_util
label_desc: Use image node_id 3 for calling a global function with example usage: _set_unary(base, name, op) and returns: ω