class_docstr: A unit test to test ancillary utils in setting up a cartesian product GP. 
class_docstr_tok: ["A","unit","test","to","test","ancillary","utils","in","setting","up","a","cartesian","product","GP","."]
docstr: Returns True if two lists of objects are equal. 
docstr_tok: ["Returns","True","if","two","lists","of","objects","are","equal","."]
code: def _test_if_two_elements_are_equal(cls, l1, l2):
      """Returns True if two lists of objects are equal."""
      for idx in range(len(l1)):
          l1_elem = l1[idx]
          l2_elem = l2[idx]
          assert (
              hasattr(l1_elem, "__iter__")
              and hasattr(l2_elem, "__iter__")
          ) or (
              not hasattr(l1_elem, "__iter__")
              and not hasattr(l2_elem, "__iter__")
          )
          if isinstance(l1_elem, np.ndarray) or isinstance(
              l2_elem, np.ndarray
          ):
              assert (
                  np.linalg.norm(np.array(l1_elem) - np.array(l2_elem))
                  < 1e-3
              )
          else:
              assert l1_elem == l2_elem
  
imports: import os
  import numpy
  from .None import cp_domain_utils
  from ..test_data.park1_3.park1_3 import park1_3
  from ..test_data.park1_3.park1_3_mf import park1_3_mf
  from ..test_data.park2_4.park2_4 import park2_4
  from ..test_data.park2_4.park2_4_mf import park2_4_mf
  from ..utils.base_test_class import BaseTestClass, execute_tests
  from ..utils.general_utils import get_idxs_from_list_of_lists
label_desc: Use image node_id 4 for calling the CPDomainUtilsTestCase obj's underlying member method code with example usage: obj._test_if_two_elements_are_equal(cls, l1, l2) without return types