code: def test_assert_equal_basic():
      """Tests assert_equal"""
      # basic types
      assert_equal(None, None)
      assert_equal(True, True)
      assert_equal(False, False)
      assert_equal("string", "string")
      assert_equal(1, 1)
      assert_equal(1.234, 1.234)
      assert_equal(3.0, 4.0, rel=0.25)
      assert_equal(4.0, 3.0, rel=0.25)
      with pytest.raises(AssertionError):
          assert_equal(3.0, 4.0, rel=0.24)
      assert_equal([1.234], [1.234])
      assert_equal(["str", 0, 1.234, 2.345], ["str", 0, 1.234, 2.345])
  
      # series
      s1 = pd.Series([1.0, 2.0, 3.0, 4.0, 5.0])
      s2 = pd.Series([1.0, 2.0, 3.0, 4.0, 5.0])
      assert_equal(s1, s2)
  
      # pandas Dataframe, kwargs
      df1 = pd.DataFrame({"a": [1, 2], "b": [3, 4]})
      df2 = pd.DataFrame({"a": [1, 2], "b": [3.0, 4.0]})
      assert_equal(df1, df1)
      assert_equal(df1, df2, check_dtype=False)
  
      # index
      ind1 = pd.Index([1.0, 2.0, 3.0, 4.0, 5.0])
      ind2 = pd.Index([1.0, 2.0, 3.0, 4.0, 5.0])
      assert_equal(ind1, ind2)
  
      # np array, `rel`
      n1 = np.array([1, 2, 3, 4])
      n2 = np.array([1, 2, 3, 4])
      assert_equal(n1, n2)
  
      n1 = np.array([1, 2, 3, 4.124])
      n2 = np.array([1, 2, 3, 4.123])
      assert_equal(n1, n2, rel=1e-3)
  
      # dictionary
      assert_equal({"df": df1}, {"df": df2}, check_dtype=False)
  
      assert_equal(
          actual={
              "a": {"a_a": {"a_a_a": df1}, "a_b": s1},
              "b": "string",
              "c": 1,
          },
          expected={
              "a": {"a_a": {"a_a_a": df2}, "a_b": s2},
              "b": "string",
              "c": 1,
          },
          check_dtype=False,
      )
  
      # list
      assert_equal([1, 2, 3], [1, 2, 3])
  
      assert_equal([1, 2, 3, 4.12345], [1, 2, 3, 4.1233], rel=1e-2)
  
      assert_equal([3, 2, 1], [1, 2, 3], ignore_list_order=True)
  
      assert_equal([s1, df1, "df"], [s2, df1, "df"])
  
      assert_equal([s1, df1, "df"], [s2, df2, "df"], check_dtype=False)
  
      # negative cases
      with pytest.raises(
          AssertionError,
          match=r"Actual does not match expected\. Actual: 1\. Expected: 2\.",
      ):
          assert_equal([1], [2])
  
      with pytest.raises(
          AssertionError, match=r"Attribute \"dtype\" are different"
      ):
          assert_equal(df1, df2)
  
      with pytest.raises(
          AssertionError,
          match=r"Actual does not match expected\. Actual: 4\.123\. Expected: 4\.124\.",
      ):
          assert_equal([1, 2, 3, 4.123], [1, 2, 3, 4.124])
  
      with pytest.raises(
          AssertionError,
          match=r"Not equal to tolerance rtol=1e-05, atol=0",
      ):
          assert_equal(
              np.array([1, 2, 3, 4.12345]), np.array([1, 2, 3, 4.123])
          )
  
      with pytest.raises(
          AssertionError,
          match=r"Not equal to tolerance rtol=1e-07, atol=0",
      ):
          assert_equal(
              np.array([1, 2, 3, 4.123]),
              np.array([1, 2, 3, 4.120]),
              rel=1e-7,
          )
  
      assert_equal(
          np.array([1, 2, 3, 4.123]),
          np.array([1, 2, 3, 4.120]),
          rel=1e-2,
      )
  
      with pytest.raises(
          AssertionError, match=r"Actual should be numeric, found None"
      ):
          assert_equal(actual=None, expected=1)
  
      with pytest.raises(
          AssertionError, match=r"Actual should be None, found 1"
      ):
          assert_equal(actual=1, expected=None)
  
      with pytest.raises(
          AssertionError, match=r"Actual should be a pandas Series"
      ):
          assert_equal(n1, s1)
  
      with pytest.raises(
          AssertionError, match=r"Actual should be a numpy array"
      ):
          assert_equal(s1, n1)
  
      # properly identifies location in dict
      with pytest.raises(
          AssertionError,
          match=r"Error at dictionary location: dict\['a'\]\['a'\]\['a'\].\n"
          r"Actual should be a pandas DataFrame, found df1\.",
      ):
          assert_equal(
              actual={
                  "a": {"a": {"a": "df1"}, "b": s1},  # mismatch
                  "b": "string",
                  "c": 1,
              },
              expected={
                  "a": {"a": {"a": df2}, "b": s2},
                  "b": "string",
                  "c": 1,
              },
          )
  
      with pytest.raises(
          AssertionError,
          match=r"Error at dictionary location: dict\['d'\].\n"
          r"Actual should be a pandas DataFrame, found df1\.",
      ):
          assert_equal(
              actual=[
                  1,
                  {
                      "a": {"a": {"a": df1}, "b": s1},
                      "b": "string",
                      "c": 1,
                      "d": "df1",  # mismatch
                  },
              ],
              expected=[
                  1,
                  {
                      "a": {"a": {"a": df1}, "b": s2},
                      "b": "string",
                      "c": 1,
                      "d": df1,
                  },
              ],
          )
  
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 6 for calling a global function with example usage: test_assert_equal_basic() without return types