code: def _compare_subdict(actual_dict, exp_sub_dict):
      for key, value in exp_sub_dict.items():
          assert key in actual_dict
          assert actual_dict[key] == value
  
imports: import contextlib
  from typing import Optional
  from unittest import mock
  import numpy
  import pytest
  import xarray
label_desc: Use image node_id 2 for calling a global function with example usage: _compare_subdict(actual_dict, exp_sub_dict) without return types