code: def _squeeze(arr: np.ndarray):
      """Squeezes arr while aways returning an array unless 'arr' is a scalar."""
      if arr.shape not in ((), (1,)):
          arr = arr.squeeze()
          if not arr.shape:
              arr = np.expand_dims(arr, axis=0)
      return arr
  
imports: import inspect
  import math
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Tuple, Union
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.metrics import metric_types
  from tensorflow_model_analysis.proto import config_pb2
  from tensorflow_model_analysis.utils import util
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 19 for calling a global function with example usage: _squeeze(arr) and returns: arr