code: def _squeeze_if_scalar(data: Any) -> Any:
      return apply_to_collection(
          data, Tensor, _squeeze_scalar_element_tensor
      )
  
imports: import sys
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import torch
  from lightning_utilities import apply_to_collection
  from torch import Tensor
  from torchmetrics.utilities.exceptions import TorchMetricsUserWarning
  from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_12, _TORCH_GREATER_EQUAL_1_13, _XLA_AVAILABLE
  from torchmetrics.utilities.prints import rank_zero_warn
label_desc: Use image node_id 13 for calling a global function with example usage: _squeeze_if_scalar(data) and returns: apply_to_collection