code: def rle_decode(mask_rle:str, shape:Tuple[int,int])->NPArrayMask:
      "Return an image array from run-length encoded string `mask_rle` with `shape`."
      s = mask_rle.split()
      starts, lengths = [np.asarray(x, dtype=int) for x in (s[0:][::2], s[1:][::2])]
      starts -= 1
      ends = starts + lengths
      img = np.zeros(shape[0]*shape[1], dtype=np.uint)
      for low, up in zip(starts, ends): img[low:up] = 1
      return img.reshape(shapef rle_decode(mask_rle:str, shape:Tuple[int,int])->NPArrayMask:
      "Return an image array from run-length encoded string `mask_rle` with `shape`."
      s = mask_rle.split()
      starts, lengths = [np.asarray(x, dtype=int) for x in (s[0:][::2], s[1:][::2])]
      starts -= 1
      ends = starts + lengths
      img = np.zeros(shape[0]*shape[1], dtype=np.uint)
      for low, up in zip(starts, ends): img[low:up] = 1
      return img.reshape(shape)
docs: Return an image array from run-length encoded string `mask_rle` with `shape`.