code: def modeling_module(request_info):
      json_file = request_info["json"]
      df = request_info["df"]
      y = request_info["y"]
      if "modeling" not in json_file:
          model = default_modeling(df, y)
      else:
          if "custom" in json_file["modeling"]:
              sys_path = "/nylon/supplementaries/buffer/"
              sys.path.insert(1, os.getcwd() + sys_path)
  
              absolute_path = (
                  os.path.abspath(os.getcwd())
                  + "/nylon/supplementaries/buffer/temp.py"
              )
              file_name = json_file["modeling"]["custom"]["loc"].rsplit(
                  "/"
              )[-1]
              shutil.copy(
                  json_file["modeling"]["custom"]["loc"], absolute_path
              )
  
              mod = import_module("temp")
              new_func = getattr(
                  mod, json_file["modeling"]["custom"]["name"]
              )
  
              model = new_func(df["train"], y["train"])
              sys.path.remove(sys_path)
              os.remove("./buffer/temp.py")
  
          if "type" in json_file["modeling"]:
              type_model = json_file["modeling"]["type"]
              model_storage = []
              accs = []
  
              if isinstance(type_model, str):
                  type_model = [type_model]
  
              fifty_train, _, fifty_y, _ = train_test_split(
                  df["train"], y["train"], test_size=0.5
              )
  
              for a_model in type_model:
                  if a_model not in models.keys():
                      raise Exception(
                          "The specified model -- {} -- is not in the list of available models".format(
                              a_model
                          )
                      )
                  model = models[a_model](
                      fifty_train,
                      fifty_y,
                      json_file=json_file["modeling"],
                  )
                  model_storage.append(model)
                  curr_acc = accuracy_score(
                      model.predict(df["test"]), y["test"]
                  )
                  accs.append(curr_acc)
  
              max_accuracy = accs.index(max(accs))
              best_model_type = type_model[max_accuracy]
              model = models[best_model_type](
                  df["train"],
                  y["train"],
                  json_file=json_file["modeling"],
              )
          elif "voting" in json_file["modeling"]:
              classifiers = json_file["modeling"]["voting"]
  
              if len(classifiers) < 2:
                  raise Exception(
                      "Voting classifiers cannot have less than two models for the ensemble."
                  )
  
              voting_classifier = VotingClassifier(
                  estimators=return_models_voting(classifiers)
              )
              voting_classifier.fit(df["train"], y["train"])
  
              model = voting_classifier
  
          elif "bag" in json_file["modeling"]:
              classifier = json_file["modeling"]["bag"]
  
              if isinstance(classifier, str):
                  pass
              else:
                  raise Exception(
                      "You can only use one base classifier for bagging."
                  )
  
              bagging_classifier = BaggingClassifier(
                  base_estimator=classifier
              )
  
              bagging_classifier.fit(df["train"], y["train"])
              model = bagging_classifier
  
      request_info["df"] = df
      request_info["model"] = model
      request_info["y"] = y
  
      return request_info
  
imports: from pandas.core.algorithms import mode
  from pandas.io import json
  from sklearn.metrics import accuracy_score
  from sklearn.linear_model import LinearRegression
  from sklearn.ensemble import RandomForestRegressor
  import os
  from sklearn.ensemble import BaggingClassifier
  import sys
  from importlib import import_module
  import shutil
  from sklearn.ensemble import VotingClassifier
  import ssl
  from nylon.preprocessing.preprocessing import initial_preprocessor
  import nltk
  import pandas
  import time
  from sklearn.model_selection import train_test_split
  from sklearn.decomposition import PCA
  from nylon.modeling.modeling import a_svm, nearest_neighbors, a_tree, sgd, gradient_boosting, adaboost, rf, mlp, default_modeling, svm_stroke, ensemble_stroke
  from nylon.preprocessing.preprocessing_methods import handle_scaling, handle_min_max, handle_label_encode, handle_ordinal, handle_filling, handle_importance, handle_one_hot, handle_text, handle_embedding, handle_dates
  from nylon.analysis.analysis import default_analysis, acc_score, cross_score, confusion, precision_calculation, recall_score_helper
  from nylon.data.reader import DataReader
label_desc: Use image node_id 3 for calling a global function with example usage: modeling_module(request_info) and returns: request_info