code: def sparse_flow_from_bytes(content):
      """Read the optical flow in KITTI datasets from bytes.
  
      This function is modified from RAFT load the `KITTI datasets
      <https://github.com/princeton-vl/RAFT/blob/224320502d66c356d88e6c712f38129e60661e80/core/utils/frame_utils.py#L102>`_.
  
      Args:
          content (bytes): Optical flow bytes got from files or other streams.
  
      Returns:
          Tuple(ndarray, ndarray): Loaded optical flow with the shape (H, W, 2)
              and flow valid mask with the shape (H, W).
      """  # nopa
  
      content = np.frombuffer(content, np.uint8)
      flow = cv2.imdecode(
          content, cv2.IMREAD_ANYDEPTH | cv2.IMREAD_COLOR
      )
      flow = flow[:, :, ::-1].astype(np.float32)
      # flow shape (H, W, 2) valid shape (H, W)
      flow, valid = flow[:, :, :2], flow[:, :, 2]
      flow = (flow - 2**15) / 64.0
      return flow, valid
  
file_path: lavis/lavis/common/annotator/uniformer/mmcv/video/optflow.py
imports: import warnings
  import cv2
  import numpy
  from annotator.uniformer.mmcv.arraymisc import dequantize, quantize
  from annotator.uniformer.mmcv.image import imread, imwrite
  from annotator.uniformer.mmcv.utils import is_str
label_desc: Use image node_id 7 for calling a global function with example usage: sparse_flow_from_bytes(content) and returns: flow,  valid