code: def _num_outputs(
      batched_outputs: Union[Tensor, Tuple[Tensor, ...]]
  ) -> int:
      if isinstance(batched_outputs, tuple):
          return len(batched_outputs)
      return 1
  
file_path: pytorch/torch/_vmap_internals.py
imports: import functools
  import warnings
  from typing import Any, Callable, List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch.utils._pytree import _broadcast_to_and_flatten, tree_flatten, tree_unflatten
label_desc: Use image node_id 2 for calling a global function with example usage: _num_outputs(batched_outputs) and returns: int, len