code: def _patch_lang_core(lang, builder):
      for name, member in inspect.getmembers(lang):
          if tl.core.is_builtin(member):
              patch_attr(lang, name, member, builder)
      # reduce is better off with a separate patch due to how
      # the builder currently interfaces with custom functions
  
      def _new_reduce(input, axis, combine_fn):
          fn = combine_fn.fn.__name__
          mapping = {
              "maximum": np.max,
              "_sum_combine": np.sum,
          }
          ret = mapping[fn](input.handle.data, axis=axis)
          ret_type = tl.block_type(input.dtype, ret.shape)
          return tl.core.tensor(
              TensorHandle(ret, input.dtype), ret_type
          )
  
      lang.reduce = _new_reduce
  
imports: import inspect
  import numpy
  import triton
  import triton.language
  from .._C.libtriton import interpreter
label_desc: Use image node_id 5 for calling a global function with example usage: _patch_lang_core(lang, builder) and returns: tl