code: def _check_figure_layout_objects(
      test_input, expected, fig, layout_key="shapes"
  ):
      f, kwargs = test_input
      f(fig, **kwargs)
      ret = True
      if len(fig.layout[layout_key]) != len(expected):
          assert False
      for s, d in zip(fig.layout[layout_key], expected):
          ret &= _cmp_partial_dict(s, d)
      assert ret
  
label_desc: Use image node_id 2 for calling a global function with example usage: _check_figure_layout_objects(test_input, expected, fig, layout_key) without return types