code: def __cat_stack_helper(op, tensors, *args, **kwargs):
      assert op in [
          "cat",
          "stack",
      ], "Unsupported op for helper function"
      assert isinstance(tensors, list), "%s input must be a list" % op
      assert (
          len(tensors) > 0
      ), "expected a non-empty list of CrypTensors"
  
      # Determine op-type
      funcs = {"cat": torch_cat, "stack": torch_stack}
      func = funcs[op]
      if hasattr(tensors[0]._tensor, op):
          func = getattr(tensors[0]._tensor, op)
  
      # type coordination
      for i, tensor in enumerate(tensors[1:]):
          if torch.is_tensor(tensor) or isinstance(
              tensor, (int, float)
          ):
              tensors[i] = tensors[0].new(tensor)
          assert isinstance(
              tensors[i], type(tensors[0])
          ), f"{op} tensor type mismatch"
  
      # Operate on all input tensors
      result = tensors[0].clone()
      result._tensor = func(
          [tensor._tensor for tensor in tensors], *args, **kwargs
      )
      return result
  
imports: import torch
  from ..common.tensor_types import is_tensor
  from ..common.util import torch_cat, torch_stack
label_desc: Use image node_id 14 for calling a global function with example usage: __cat_stack_helper(op, tensors) and returns: result