code: def _torch_reduce(fn):
      def reduce_fn(*args, **kwargs):
          if len(args) == 1 and len(kwargs) == 0:
              return _torch_reduce_all(fn)(args[0])
          return _torch_reduce_dim(fn)(*args, **kwargs)
  
      return reduce_fn
  
file_path: pytorch/torch/masked/maskedtensor/reductions.py
imports: import warnings
  import torch
  from .core import is_masked_tensor
  from .creation import as_masked_tensor, masked_tensor
label_desc: Use image node_id 8 for calling a global function with example usage: _torch_reduce(fn) and returns: reduce_fn, _torch_reduce_dim, _torch_reduce_all