code: def run_length_encoding(x):
      bs = np.where(x.T.flatten())[0]
  
      rle = []
      prev = -2
      for b in bs:
          if b > prev + 1:
              rle.extend((b + 1, 0))
          rle[-1] += 1
          prev = b
      return rle
  
imports: import os
  import json
  import sys
  import time
  import numpy
  import pandas
  from PIL import Image
  from tqdm import tqdm
  from pycocotools import mask
  from sklearn.model_selection import KFold
  import settings
label_desc: Use image node_id 4 for calling a global function with example usage: run_length_encoding(x) and returns: rle