class_docstr: The base Ax test case, contains various helper functions to write unittests.
docstr: Check that two Ax objects that subclass ``Base`` are equal or raise
  assertion error otherwise.
  
  Args:
      first: ``Base``-subclassing object to compare to ``second``.
      second: ``Base``-subclassing object to compare to ``first``.
      msg: Message to put into the assertion error raised on inequality; if not
          specified, a default message is used.
      skip_db_id_check: If ``True``, will exclude the ``db_id`` attributes from
          the equality check. Useful for ensuring that all attributes of an object
          are equal except the ids, with which one or both of them are saved to
          the database (e.g. if confirming an object before it was saved, to the
           version reloaded from the DB).
docstr_tok: ["Check","that","two","Ax","objects","that","subclass","``","Base","``","are","equal","or","raise","assertion","error","otherwise",".","Args",":","first",":","``","Base","``","-subclassing","object","to","compare","to","``","second","``",".","second",":","``","Base","``","-subclassing","object","to","compare","to","``","first","``",".","msg",":","Message","to","put","into","the","assertion","error","raised","on","inequality",";","if","not","specified",",","a","default","message","is","used",".","skip_db_id_check",":","If","``","True","``",",","will","exclude","the","``","db_id","``","attributes","from","the","equality","check",".","Useful","for","ensuring","that","all","attributes","of","an","object","are","equal","except","the","ids",",","with","which","one","or","both","of","them","are","saved","to","the","database","(","e.g",".","if","confirming","an","object","before","it","was","saved",",","to","the","version","reloaded","from","the","DB",")","."]
code: def assertAxBaseEqual(
      self,
      first: Base,
      second: Base,
      msg: Optional[str] = None,
      skip_db_id_check: bool = False,
  ) -> None:
      """Check that two Ax objects that subclass ``Base`` are equal or raise
      assertion error otherwise.
  
      Args:
          first: ``Base``-subclassing object to compare to ``second``.
          second: ``Base``-subclassing object to compare to ``first``.
          msg: Message to put into the assertion error raised on inequality; if not
              specified, a default message is used.
          skip_db_id_check: If ``True``, will exclude the ``db_id`` attributes from
              the equality check. Useful for ensuring that all attributes of an object
              are equal except the ids, with which one or both of them are saved to
              the database (e.g. if confirming an object before it was saved, to the
               version reloaded from the DB).
      """
      self.assertIsInstance(
          first, Base, "First argument is not a subclass of Ax `Base`."
      )
      self.assertIsInstance(
          second,
          Base,
          "Second argument is not a subclass of Ax `Base`.",
      )
      if (
          not first._eq_skip_db_id_check(other=second)
          if skip_db_id_check
          else first != second
      ):
          raise self.failureException(
              "Encountered unequal objects. "
              "Attempting in-depth comparison; note that this recurs through the"
              " attributes of the objects being compared multiple times!\n\n"
              + _build_comparison_str(
                  first=first,
                  second=second,
                  skip_db_id_check=skip_db_id_check,
              ),
          )
  
imports: import builtins
  import contextlib
  import io
  import linecache
  import logging
  import signal
  import sys
  import types
  import unittest
  from functools import wraps
  from logging import Logger
  from types import FrameType
  from typing import Any, Callable, ContextManager, Dict, Generator, List, Optional, Tuple, Type, TypeVar, Union
  from unittest.mock import MagicMock
  import yappi
  from ax.utils.common.base import Base
  from ax.utils.common.equality import object_attribute_dicts_find_unequal_fields
  from ax.utils.common.logger import get_logger
  from pyfakefs import fake_filesystem_unittest
label_desc: Use image node_id 5 for calling the TestCase obj's underlying member method code with example usage: obj.assertAxBaseEqual(first, second, msg, skip_db_id_check) without return types