code: def __init__(
      self,
      *,
      model,
      loss,
      optimizer=None,
      metrics=None,
      feature_preprocessing=None,
      label_preprocessing=None,
      model_dir=None,
  ):
      self.loss = loss
      self.optimizer = optimizer
      self.metrics = Metric.convert_metrics_list(metrics)
      self.feature_preprocessing = feature_preprocessing
      self.label_preprocessing = label_preprocessing
      self.model_dir = model_dir
      self.model = model
      self.nn_model = NNModel(
          self.model, feature_preprocessing=self.feature_preprocessing
      )
      self.nn_estimator = NNEstimator(
          self.model,
          self.loss,
          self.feature_preprocessing,
          self.label_preprocessing,
      )
      if self.optimizer is None:
          from bigdl.optim.optimizer import SGD
  
          self.optimizer = SGD()
      self.nn_estimator.setOptimMethod(self.optimizer)
      self.estimator = SparkEstimator(
          self.model, self.optimizer, self.model_dir
      )
      self.log_dir = None
      self.app_name = None
      self.is_nnframe_fit = False
  
imports: from zoo.orca.learn.metrics import Metric
  from zoo.orca.learn.utils import bigdl_metric_results_to_dict
  from zoo.pipeline.nnframes import NNEstimator, NNModel
  from zoo.pipeline.estimator import Estimator
  from zoo.orca.learn.spark_estimator import Estimator
  from zoo.orca.data import SparkXShards
  from bigdl.optim.optimizer import MaxEpoch
  from zoo.feature.common import FeatureSet
  from zoo.orca.learn.metrics import Accuracy
  from pyspark.sql.dataframe import DataFrame
label_desc: Use image node_id 1 to create a new BigDLEstimator object from inherited base classes: OrcaSparkEstimator with example: obj = BigDLEstimator()