code: def _assert_recursively_close(
      obj_a, obj_b, location, *args, **kwargs
  ):
      assert type(obj_a) == type(
          obj_b
      ), f"types don't match (at {location}) {type(obj_a)} != {type(obj_b)}"
      if isinstance(obj_a, (str, int)):
          assert obj_a == obj_b
      elif isinstance(obj_a, float):
          assert np.isclose(obj_a, obj_b, *args, **kwargs)
      elif isinstance(obj_a, list):
          assert len(obj_a) == len(
              obj_b
          ), f"lengths don't match (at {location})"
          for i, (element_a, element_b) in enumerate(zip(obj_a, obj_b)):
              _assert_recursively_close(
                  element_a,
                  element_b,
                  location=f"{location}.{i}",
                  *args,
                  **kwargs,
              )
      elif isinstance(obj_a, dict):
          assert (
              obj_a.keys() == obj_b.keys()
          ), f"keys don't match (at {location})"
          for k in obj_a:
              _assert_recursively_close(
                  obj_a[k],
                  obj_b[k],
                  location=f"{location}.{k}",
                  *args,
                  **kwargs,
              )
      elif isinstance(obj_a, np.ndarray):
          assert (
              obj_a.dtype == obj_b.dtype
          ), f"numpy arrays have different dtype (at {location})"
          assert np.allclose(
              obj_a, obj_b, *args, **kwargs
          ), f"numpy arrays are not close enough (at {location})"
      elif isinstance(obj_a, pd.Period):
          assert obj_a == obj_b
      elif obj_a is None:
          assert obj_b is None
      else:
          raise TypeError(f"unsupported type {type(obj_a)}")
  
imports: import pandas
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _assert_recursively_close(obj_a, obj_b, location) without return types