class_docstr: Provides some helper functions to make testing easier.
class_docstr_tok: ["Provides","some","helper","functions","to","make","testing","easier","."]
docstr: Helper function for assert_dict_equal
  
  By default removes uid from d1 and/or d2 if present
  then calls assert_dict_equal.
  
  :param (list|tuple) ignore: sequence of key names as
      strings that are removed from both d1 and d2 if
      they exist
docstr_tok: ["Helper","function","for","assert_dict_equal","By","default","removes","uid","from","d1","and\/or","d2","if","present","then","calls","assert_dict_equal",".",":","param","(","list|tuple",")","ignore",":","sequence","of","key","names","as","strings","that","are","removed","from","both","d1","and","d2","if","they","exist"]
code: def assert_fig_equal(self, d1, d2, msg=None, ignore=["uid"]):
      """
      Helper function for assert_dict_equal
  
      By default removes uid from d1 and/or d2 if present
      then calls assert_dict_equal.
  
      :param (list|tuple) ignore: sequence of key names as
          strings that are removed from both d1 and d2 if
          they exist
      """
      # deep copy d1 and d2
      if "to_plotly_json" in dir(d1):
          d1_copy = copy.deepcopy(d1.to_plotly_json())
      else:
          d1_copy = copy.deepcopy(d1)
  
      if "to_plotly_json" in dir(d2):
          d2_copy = copy.deepcopy(d2.to_plotly_json())
      else:
          d2_copy = copy.deepcopy(d2)
  
      for key in ignore:
          if key in d1_copy.keys():
              del d1_copy[key]
          if key in d2_copy.keys():
              del d2_copy[key]
  
      self.assert_dict_equal(d1_copy, d2_copy, msg=None)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_optional/optional_utils.py
imports: import numpy
  from plotly import optional_imports
  from plotly.tests.utils import is_num_list
  from plotly.utils import get_by_path, node_generator
  import copy
label_desc: Use image node_id 2 for calling the NumpyTestUtilsMixin obj's underlying member method code with example usage: obj.assert_fig_equal(d1, d2, msg, ignore) without return types