code: def objective(trial):
      iris = sklearn.datasets.load_iris()
      classes = list(set(iris.target))
      (
          train_x,
          valid_x,
          train_y,
          valid_y,
      ) = sklearn.model_selection.train_test_split(
          iris.data, iris.target, test_size=0.25, random_state=0
      )
  
      alpha = trial.suggest_float("alpha", 1e-5, 1e-1, log=True)
      clf = sklearn.linear_model.SGDClassifier(alpha=alpha)
  
      for step in range(100):
          clf.partial_fit(train_x, train_y, classes=classes)
  
          # Report intermediate objective value.
          intermediate_value = 1.0 - clf.score(valid_x, valid_y)
          trial.report(intermediate_value, step)
  
          # Handle pruning based on the intermediate value.
          if trial.should_prune():
              raise optuna.TrialPruned()
  
      return 1.0 - clf.score(valid_x, valid_y)
  
imports: import optuna
  import logging
  import sys
  import sklearn.datasets
  import sklearn.linear_model
  import sklearn.model_selection
label_desc: Use image node_id 1 for calling a global function with example usage: objective(trial) and returns: unknown