code: def test_mask_array_to_coco_rle():
      mask = MaskArray(np.array([[[0, 0, 1, 1, 1, 0, 1]]]))
      assert mask.to_coco_rle(h=1, w=7) == [
          {"counts": [2, 3, 1, 1], "size": (1, 7)}
      ]
  
      mask = MaskArray(np.array([[[1, 1, 1, 1, 1, 1, 0]]]))
      assert mask.to_coco_rle(h=1, w=7) == [
          {"counts": [0, 6, 1], "size": (1, 7)}
      ]
  
file_path: icevision/tests/core/test_mask.py
imports: import pytest
  from icevision.all import *
label_desc: Use image node_id 7 for calling a global function with example usage: test_mask_array_to_coco_rle() without return types