code: def get_frames(
      cls, frame_buffer_indices, frame_type="FULL", **kwargs
  ):
      while True:
          if (
              redis_client.llen(config["frame_grabber"]["redis_key"])
              > 149
          ):
              break
  
          time.sleep(0.1)
  
      game_frame_buffer = GameFrameBuffer(
          size=len(frame_buffer_indices)
      )
  
      for i in frame_buffer_indices:
          redis_key = config["frame_grabber"]["redis_key"]
          redis_key = (
              redis_key + "_PIPELINE"
              if frame_type == "PIPELINE"
              else redis_key
          )
  
          frame_data = redis_client.lindex(redis_key, i)
  
          timestamp, shape, dtype, frame_bytes = frame_data.split(
              "~".encode("utf-8"), maxsplit=3
          )
  
          if dtype == "PNG".encode("utf-8"):
              frame_array = frame_bytes
          else:
              frame_shape = [
                  int(i) for i in shape.decode("utf-8").split(", ")
              ]
              frame_array = np.fromstring(
                  frame_bytes, dtype=dtype.decode("utf-8")
              ).reshape(frame_shape)
  
          game_frame = GameFrame(
              frame_array, timestamp=float(timestamp)
          )
  
          game_frame_buffer.add_game_frame(game_frame)
  
      return game_frame_buffer
  
file_path: SerpentAI/serpent/frame_grabber.py
imports: import numpy
  import mss
  from redis import StrictRedis
  from serpent.config import config
  import time
  from serpent.game_frame import GameFrame
  from serpent.game_frame_buffer import GameFrameBuffer
  from serpent.frame_transformation_pipeline import FrameTransformationPipeline
label_desc: Use image node_id 5 for calling the FrameGrabber obj's underlying member method code with example usage: obj.get_frames(cls, frame_buffer_indices, frame_type) and returns: game_frame_buffer