code: def estimator_type(model):
      s = str(type(model))
      model_name = re.search(".*'(.+?)'.*", s).group(1).split(".")[-1]
      return model_name
  
imports: from copy import copy
  from inspect import signature, _empty
  import re
  from collections.abc import Iterable
  from collections import defaultdict
  from itertools import product
  from six import string_types
label_desc: Use image node_id 3 for calling a global function with example usage: estimator_type(model) and returns: model_name