code: def create_method(fn, name=None):
      name = name or fn.__name__
  
      def f(*args, **kwargs):
          return fn(*args, **kwargs)
  
      f.__name__ = name
      f.__qualname__ = f"ndarray.{name}"
      return f
  
imports: from __future__ import annotations
  import builtins
  import math
  import operator
  from typing import Sequence
  import torch
  from .None import _dtypes, _dtypes_impl, _funcs, _ufuncs, _util
  from ._normalizations import ArrayLike, normalize_array_like, normalizer, NotImplementedType
label_desc: Use image node_id 1 for calling a global function with example usage: create_method(fn, name) and returns: f, fn