code: def __call__(self, trial):
      try:
          Algorithm = (
              MLPRegressorAlgorithm
              if self.ml_task == REGRESSION
              else MLPAlgorithm
          )
          params = {
              "dense_1_size": trial.suggest_int("dense_1_size", 4, 100),
              "dense_2_size": trial.suggest_int("dense_2_size", 2, 100),
              "learning_rate": trial.suggest_categorical(
                  "learning_rate", [0.005, 0.01, 0.05, 0.1, 0.2]
              ),
              "learning_rate_type": trial.suggest_categorical(
                  "learning_rate_type", ["constant", "adaptive"]
              ),
              "alpha": trial.suggest_float(
                  "alpha", 1e-8, 10.0, log=True
              ),
              "seed": self.seed,
              "ml_task": self.ml_task,
          }
          model = Algorithm(params)
          model.fit(
              self.X_train,
              self.y_train,
              sample_weight=self.sample_weight,
          )
  
          preds = model.predict(self.X_validation)
  
          score = self.eval_metric(self.y_validation, preds)
          if Metric.optimize_negative(self.eval_metric.name):
              score *= -1.0
  
      except optuna.exceptions.TrialPruned as e:
          raise e
      except Exception as e:
          print("Exception in NeuralNetworkObjective", str(e))
          return None
  
      return score
  
imports: import optuna
  from supervised.algorithms.nn import MLPAlgorithm, MLPRegressorAlgorithm
  from supervised.algorithms.registry import BINARY_CLASSIFICATION, MULTICLASS_CLASSIFICATION, REGRESSION
  from supervised.utils.metric import Metric
label_desc: Use image node_id 2 for calling the NeuralNetworkObjective obj's underlying member method code with example usage: obj.__call__(trial) and returns: score, None