code: def pack_if_needed(data):
      if isinstance(data, np.ndarray):
          data = pack(data)
      return data
  
file_path: ray/python/ray/rllib/utils/compression.py
imports: from ray.rllib.utils.annotations import DeveloperAPI
  import logging
  import time
  import base64
  import numpy
  from ray import cloudpickle
label_desc: Use image node_id 3 for calling a global function with example usage: pack_if_needed(data) and returns: data