code: def extract_params(config):
      assert (
          "model" in config.keys()
      ), "model parameters need to be provided in the yaml file"
      assert (
          "target" in config.keys()
      ), "target variable needs to be provided in the yaml file"
      model_params = config.get("model")
      model_type = model_params.get("type")
      algorithm = model_params.get("algorithm")
      target = config.get("target")
  
      if any(not item for item in [model_type, target, algorithm]):
          raise Exception(
              "parameters in the model yaml file cannot be None"
          )
      else:
          return model_type, target, algorithm
  
file_path: igel/igel/utils.py
imports: import json
  import logging
  import joblib
  import pandas
  import yaml
  from igel.configs import configs
  from igel.data import metrics_dict, models_dict
label_desc: Use image node_id 4 for calling a global function with example usage: extract_params(config) and returns: model_type,  target,  algorithm