code: def compress_int_array(int_array, num_possible_values) -> np.ndarray:
      """Compresses dtype of np.ndarray<int> if num_possible_values is small enough."""
      try:
          compressed_type = None
          if num_possible_values < np.iinfo(np.dtype("int16")).max:
              compressed_type = "int16"
          elif (
              num_possible_values < np.iinfo(np.dtype("int32")).max
          ):  # pragma: no cover
              compressed_type = "int32"  # pragma: no cover
          if compressed_type is not None:
              int_array = int_array.astype(compressed_type)
          return int_array
      except (
          Exception
      ):  # int_array may not even be numpy array, keep as is then
          return int_array
  
imports: import warnings
  import numpy
  import pandas
  from typing import Union, Tuple
  from cleanlab.typing import DatasetLike, LabelLike
  from cleanlab.internal.validation import labels_to_array
  from cleanlab.internal.constants import FLOATING_POINT_COMPARISON, TINY_VALUE
label_desc: Use image node_id 15 for calling a global function with example usage: compress_int_array(int_array, num_possible_values) and returns: int_array, int_array