code: def hv_rle(img, axis=1):
      """
      img: binary image
      axis: 0 for rows, 1 for cols
      """
      rle, values = [], []
  
      if axis == 1:
          for i in range(img.shape[1]):
              col_rle, col_values = rle_encode(img[:, i])
              rle.append(col_rle)
              values.append(col_values)
      else:
          for i in range(img.shape[0]):
              row_rle, row_values = rle_encode(img[i])
              rle.append(row_rle)
              values.append(row_values)
  
      return rle, values
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: hv_rle(img, axis) and returns: rle,  values