code: def neural_nets_are_equal(net1, net2):
      """Returns true if both net1 and net2 are equal."""
      is_true = True
      for key in net1.__dict__.keys():
          val1 = net1.__dict__[key]
          val2 = net2.__dict__[key]
          is_true = True
          if isinstance(val1, dict):
              for val_key in val1.keys():
                  is_true = is_true and np.all(
                      val1[val_key] == val2[val_key]
                  )
          elif hasattr(val1, "__iter__"):
              is_true = is_true and np.all(val1 == val2)
          else:
              is_true = is_true and val1 == val2
          if not is_true:  # break here if necessary
              return is_true
      return is_true
  
imports: import numpy
  from copy import copy
  from ..exd.domains import Domain
label_desc: Use image node_id 1 for calling a global function with example usage: neural_nets_are_equal(net1, net2) and returns: is_true, is_true