code: def assert_estimator_equal(left, right, exclude=None, **kwargs):
      """Check that two Estimators are equal
  
      Parameters
      ----------
      left, right : Estimators
      exclude : str or sequence of str
          attributes to skip in the check
      kwargs : dict
          Passed through to the dask `assert_eq` method.
  
      """
      left_attrs = [
          x
          for x in dir(left)
          if x.endswith("_") and not x.startswith("_")
      ]
      right_attrs = [
          x
          for x in dir(right)
          if x.endswith("_") and not x.startswith("_")
      ]
      if exclude is None:
          exclude = set()
      elif isinstance(exclude, str):
          exclude = {exclude}
      else:
          exclude = set(exclude)
  
      left_attrs2 = set(left_attrs) - exclude
      right_attrs2 = set(right_attrs) - exclude
  
      assert left_attrs2 == right_attrs2, left_attrs2 ^ right_attrs2
  
      for attr in left_attrs2:
          l = getattr(left, attr)
          r = getattr(right, attr)
          _assert_eq(l, r, name=attr, **kwargs)
  
imports: import contextlib
  import datetime
  import functools
  import logging
  import warnings
  from collections.abc import Sequence
  from multiprocessing import cpu_count
  from numbers import Integral
  from timeit import default_timer
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import sklearn.utils.extmath
  import sklearn.utils.validation
  from dask import delayed
  from dask.array.utils import assert_eq
  from dask.dataframe.utils import assert_eq
  from ._utils import ConstantFunction
label_desc: Use image node_id 7 for calling a global function with example usage: assert_estimator_equal(left, right, exclude) without return types