code: def serialize_to_bundle(self, transformer, path, model):
          
  
          # Define Node Inputs and Outputs
          inputs = [{
                    "name": transformer.input_features,
                    "port": "features"
                  }]
  
          outputs = list()
          outputs.append({
                    "name": transformer.prediction_column,
                    "port": "prediction"
                  })
  
          outputs.append({
                "name": "raw_prediction",
                "port": "raw_prediction"
               })
  
          outputs.append({
                "name": "probability",
                "port": "probability"
              })
  
          # compile tuples of model attributes to serialize
          tree_weights = Vector([1.0 for x in range(0, len(transformer.estimators_))])
          attributes = list()
          attributes.append(('num_features', transformer.n_features_))
          attributes.append(('tree_weights', tree_weights))
          attributes.append(('trees', ["tree{}".format(x) for x in range(0, len(transformer.estimators_))]))
          if isinstance(transformer, RandomForestClassifier):
              attributes.append(('num_classes', transformer.n_classes_)) # TODO: get number of classes from the transformer
  
          self.serialize(transformer, path, model, attributes, inputs, outputs)
  
          rf_path = "{}/{}.node".format(path, model)
  
          estimators = transformer.estimators_
  
          i = 0
          for estimator in estimators:
              estimator.mlinit(input_features = transformer.input_features, prediction_column = transformer.prediction_column, feature_names=transformer.feature_names)
              model_name = "tree{}".format(i)
              estimator.serialize_to_bundle(rf_path, model_name, serialize_node=False)
  
              i += 1
docs: :param transformer: Random Forest Regressor or Classifier
          :param path: Root path where to serialize the model
          :param model: Name of the model to be serialized
          :type transformer: sklearn.ensemble.forest.BaseForest
          :type path: str
          :type model: str
          :return: None