code: def pack(data):
      if LZ4_ENABLED:
          data = pickle.dumps(data)
          data = lz4.frame.compress(data)
          # TODO(ekl) we shouldn't need to base64 encode this data, but this
          # seems to not survive a transfer through the object store if we don't.
          data = base64.b64encode(data).decode("ascii")
      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 2 for calling a global function with example usage: pack(data) and returns: data