code: def test_assert_equal_ignore_keys():
      """Tests assert_equal ignore_keys parameter"""
      actual = {
          "a": {"a": {"a": 1}, "b": 2, "c": "3"},  # matches expected
          "b": 3,
          "c": [{"a": 4}],
      }
      expected = {
          "a": {"a": {"a": "1"}, "b": "2", "c": "3"},
          "b": "3",
          "c": [{"a": "4"}],
      }
  
      # ignores keys at the first level
      assert_equal(
          actual,
          expected,
          ignore_keys={"a": None, "b": None, "c": None},
      )
      # ignores keys at the second level.
      # the value can be anything that's not a dict
      assert_equal(
          actual,
          expected,
          ignore_keys={
              "a": {"a": False, "b": True},
              "b": None,
              "c": "not_a_dict",
          },
      )
      # ignores keys at the third level
      assert_equal(
          actual,
          expected,
          ignore_keys={
              "a": {"a": {"a": None}, "b": None},
              "b": None,
              "c": None,
          },
      )
      with pytest.raises(
          AssertionError,
          match=r"Error at dictionary location: dict\['c'\]\['a'\]",
      ):
          # "a" is ignored, but ["c"]["a"] is not (keys are not confused)
          # the error message on ["c"]["a"] is unconventional, since dict["c"] is a list
          assert_equal(
              actual,
              expected,
              ignore_keys={
                  "a": {"a": {"a": None}, "b": None},
                  "b": None,
              },
          )
  
      with pytest.raises(
          AssertionError,
          match=r"Error at dictionary location: dict\['a'\]\['a'\]\['a'\]",
      ):
          # ["a"]["a"]["b"] is ignored, but not ["a"]["a"]["a"]
          assert_equal(
              actual,
              expected,
              ignore_keys={
                  "a": {"a": {"b": None}, "b": None},
                  "b": None,
                  "c": None,
              },
          )
  
      with pytest.raises(
          AssertionError,
          match=r"Error at dictionary location: dict\['a'\]\['b'\]",
      ):
          # ["a"]["a"]["a"] is ignored, but not ["a"]["b"]
          assert_equal(
              actual,
              expected,
              ignore_keys={
                  "a": {"a": {"a": None}},
                  "b": None,
                  "c": None,
              },
          )
  
      with pytest.raises(
          AssertionError,
          match=r"Error at dictionary location: dict\['c'\]\['a'\]",
      ):
          with pytest.warns(Warning) as record:
              # can't ignore keys within in a list (because there are no keys to ignore)
              assert_equal(
                  actual,
                  expected,
                  ignore_keys={
                      "a": {"a": {"a": None}, "b": None},
                      "b": None,
                      "c": {"a": None},
                  },
              )
              assert (
                  r"At dictionary location: dict['c']. `ignore_keys` is {'a': None}, "
                  r"but found a list. No keys will be ignored"
                  in record[0].message.args[0]
              )
  
      with pytest.raises(
          AssertionError, match=r"Actual should be a list or tuple"
      ):
          # what is ignored is based on expected, not actual
          assert_equal(
              actual,
              [expected],
              ignore_keys={
                  "a": {"a": {"a": None}, "b": None},
                  "b": None,
              },
          )
  
imports: import warnings
  from dataclasses import dataclass
  from typing import List
  import numpy
  import pandas
  import pytest
  import scipy
  from greykite.common import constants
  from greykite.common.evaluation import ElementwiseEvaluationMetricEnum
  from greykite.common.python_utils import apply_func_to_columns
  from greykite.common.python_utils import assert_equal
  from greykite.common.python_utils import dictionaries_values_to_lists
  from greykite.common.python_utils import dictionary_values_to_lists
  from greykite.common.python_utils import flatten_list
  from greykite.common.python_utils import get_integer
  from greykite.common.python_utils import get_pattern_cols
  from greykite.common.python_utils import group_strs_with_regex_patterns
  from greykite.common.python_utils import ignore_warnings
  from greykite.common.python_utils import mutable_field
  from greykite.common.python_utils import reorder_columns
  from greykite.common.python_utils import split_offset_str
  from greykite.common.python_utils import unique_dict_in_list
  from greykite.common.python_utils import unique_elements_in_list
  from greykite.common.python_utils import unique_in_list
  from greykite.common.python_utils import update_dictionaries
  from greykite.common.python_utils import update_dictionary
label_desc: Use image node_id 7 for calling a global function with example usage: test_assert_equal_ignore_keys() without return types