code: def test_convert_records_to_coco_style_images(
      coco_records, expected_records, coco_record_id_map
  ):
      # remove id 89 because it doesn't contain any annotations and it will be removed by the parser
      # also remove some unnecessary fields like flickr_url, coco_url, ...
      expected_images = [
          {
              name: o[name]
              for name in ["id", "file_name", "height", "width"]
          }
          for o in expected_records["images"]
          if o["id"] != 89
      ]
      # some of the checks need the lists to be in the same order
      expected_images = sorted(expected_images, key=itemgetter("id"))
      images = sorted(coco_records["images"], key=itemgetter("id"))
  
      assert len(images) == len(expected_images)
      assert images[0].keys() == expected_images[0].keys()
      assert images == expected_images
  
file_path: icevision/tests/data/test_convert_records_to_coco_style.py
imports: import pytest
  import icevision
  from icevision.all import *
label_desc: Use image node_id 3 for calling a global function with example usage: test_convert_records_to_coco_style_images(coco_records, expected_records, coco_record_id_map) without return types