code: def verify_estimator_class(
      est, meta_feature_generator, metric_generators, dataset_properties
  ):
      """Verify if estimator object is valid for use i.e. scikit-learn format
  
      Verifies if an estimator is fit for use by testing for existence of methods
      such as `get_params` and `set_params`. Must also be able to properly fit on
      and predict a sample iris dataset.
  
      Args:
          est: Estimator object with `fit`, `predict`/`predict_proba`,
              `get_params`, and `set_params` methods.
  
          meta_feature_generator (str, unicode): Name of the method used by the estimator
              to generate meta-features on a set of data.
  
          metric_generators (dict): Dictionary of key value pairs where the key
              signifies the name of the metric calculated and the value is a list
              of strings, when concatenated, form Python code containing the
              function used to calculate the metric from true values and the
              meta-features generated.
  
          dataset_properties (dict): Dictionary corresponding to the properties of the dataset
              used to verify the estimator and metric generators.
  
      Returns:
          performance_dict (mapping): Mapping from performance metric
              name to performance metric value e.g. "Accuracy": 0.963
  
          hyperparameters (mapping): Mapping from the estimator's hyperparameters to
              their default values e.g. "n_estimators": 10
      """
      X, y, splits = get_sample_dataset(dataset_properties)
  
      if not hasattr(est, "get_params"):
          raise exceptions.UserError(
              "Estimator does not have get_params method"
          )
      if not hasattr(est, "set_params"):
          raise exceptions.UserError(
              "Estimator does not have set_params method"
          )
      if not hasattr(est, meta_feature_generator):
          raise exceptions.UserError(
              "Estimator does not have meta-feature generator"
              " {}".format(meta_feature_generator)
          )
  
      performance_dict = dict()
  
      true_labels = []
      preds = []
  
      try:
          for train_index, test_index in splits:
              X_train, X_test = X[train_index], X[test_index]
              y_train, y_test = y[train_index], y[test_index]
              est.fit(X_train, y_train)
              true_labels.append(y_test)
              preds.append(getattr(est, meta_feature_generator)(X_test))
          true_labels = np.concatenate(true_labels)
          preds = np.concatenate(preds, axis=0)
      except Exception as e:
          raise exceptions.UserError(repr(e))
  
      if preds.shape[0] != true_labels.shape[0]:
          raise exceptions.UserError(
              "Estimator's meta-feature generator "
              "does not produce valid shape"
          )
  
      for key in metric_generators:
          metric_generator = import_object_from_string_code(
              metric_generators[key], "metric_generator"
          )
          try:
              performance_dict[key] = metric_generator(
                  true_labels, preds
              )
          except Exception as e:
              raise exceptions.UserError(repr(e))
  
      return performance_dict, make_serializable(est.get_params())
  
imports: from __future__ import absolute_import, print_function, division, unicode_literals
  import imp
  import sys
  import os
  import hashlib
  import json
  import numpy
  from sqlalchemy import create_engine
  from sqlalchemy.orm import Session
  from six import exec_, iteritems
  from sklearn import datasets
  from sklearn import model_selection
  from xcessiv import app, exceptions
label_desc: Use image node_id 10 for calling a global function with example usage: verify_estimator_class(est, meta_feature_generator, metric_generators, dataset_properties) and returns: performance_dict,  make_serializable