code: def register_function_func(ops):
      """
      Used for registering a new __torch_function__ function to MaskedTensor
      Called via _MASKEDTENSOR_FUNCTION_TABLE[func](*args, **kwargs)
  
      The code to register a new function looks like:
  
      @register_function_func(list_of_ops)
      def foo(func, *args, **kwargs):
          <implementation>
      """
  
      def wrapper(func):
          for op in ops:
              _MASKEDTENSOR_FUNCTION_TABLE[op] = partial(func, op)
  
      return wrapper
  
imports: from functools import partial
  import torch
  from .binary import _apply_native_binary, NATIVE_BINARY_FNS, NATIVE_INPLACE_BINARY_FNS
  from .core import is_masked_tensor, MaskedTensor, _get_data, _masks_match, _maybe_get_mask
  from .passthrough import _apply_pass_through_fn, PASSTHROUGH_FNS
  from .reductions import _apply_reduction, NATIVE_REDUCE_FNS, TORCH_REDUCE_FNS, TENSOR_REDUCE_FNS
  from .unary import _apply_native_unary, NATIVE_UNARY_FNS, NATIVE_INPLACE_UNARY_FNS
label_desc: Use image node_id 2 for calling a global function with example usage: register_function_func(ops) and returns: wrapper