class_docstr: Saves some frames in a memory efficient way.
  
  Thread safety: cannot add multiple frames in parallel.
class_docstr_tok: ["Saves","some","frames","in","a","memory","efficient","way",".","Thread","safety",":","can","not","add","multiple","frames","in","parallel","."]
code: def compress(self, observation, split_axis=-1):
      # e.g. When split_axis is -1, turns an array of size 84x84x4
      # into a list of arrays of size 84x84x1.
      frame_list = np.split(
          observation, observation.shape[split_axis], split_axis
      )
      return np.array([self.add_frame(f) for f in frame_list])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import pickle
  import threading
  from absl import logging
  import numpy
  import tensorflow
  from tf_agents.replay_buffers import py_uniform_replay_buffer
  from tf_agents.specs import array_spec
  from tf_agents.trajectories import trajectory
label_desc: Use image node_id 6 for calling the FrameBuffer obj's underlying member method code with example usage: obj.compress(observation, split_axis) and returns: np