code: def test_assert_almost_equal_dict_like_object(val):
      dict_val = 1
      real_dict = {"a": val}
  
      class DictLikeObj:
          def keys(self):
              return ("a",)
  
          def __getitem__(self, item):
              if item == "a":
                  return dict_val
  
      func = (
          _assert_almost_equal_both
          if val == dict_val
          else _assert_not_almost_equal_both
      )
      func(real_dict, DictLikeObj(), check_dtype=False)
  
imports: import numpy
  import pytest
  from pandas import NA, DataFrame, Index, NaT, Series, Timestamp
  import pandas._testing
label_desc: Use image node_id 20 for calling a global function with example usage: test_assert_almost_equal_dict_like_object(val) and returns: str, dict_val