code: def mlp(df_1, y, json_file, trained=True):
      """
      mlp  training function
      :param df_1: dataframe
      :param y: is the target column
      :trained: whether the model is already trained or not
      :return compiled mlp model
      """
      activation = "relu"
      solver = "adam"
      alpha = 0.0001
      batch_size = "auto"
      learning_rate = "constant"
  
      if "params" in json_file:
          parameters = json_file["params"]
          if "activation" in parameters:
              activation = parameters["activation"]
          if "solver" in parameters:
              solver = parameters["solver"]
          if "alpha" in parameters:
              alpha = parameters["alpha"]
          if "batch_size" in parameters:
              batch_size = parameters["batch_size"]
          if "learning_rate" in parameters:
              learning_rate = parameters["learning_rate"]
  
      clf = MLPClassifier(
          activation=activation,
          solver=solver,
          alpha=alpha,
          batch_size=batch_size,
          learning_rate=learning_rate,
      )
      if trained:
          clf.fit(df_1, y)
      return clf
  
imports: from sklearn.tree import DecisionTreeClassifier
  from sklearn import svm
  import numpy
  from sklearn.linear_model import SGDClassifier
  from sklearn.neighbors import KNeighborsClassifier
  from sklearn.ensemble import GradientBoostingClassifier
  from sklearn.ensemble import AdaBoostClassifier
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.neural_network import MLPClassifier
  from sklearn.metrics import accuracy_score
  from sklearn.ensemble import ExtraTreesClassifier
  from sklearn.model_selection import GridSearchCV, RandomizedSearchCV
  import warnings
label_desc: Use image node_id 9 for calling a global function with example usage: mlp(df_1, y, json_file, trained) and returns: clf