code: def load_parameters(**kwargs):
      """
      Load parameters from the ini file if specified, take into account any
      command line argument, and ensure that each parameter is cast to the
      correct type.
  
      Command line arguments take precedence over parameters specified in the
      parameter file.
      """
      param = {}
      param_default = _get_default_param()
  
      # use parameter path if provided, otherwise use default
      try:
          if kwargs["parameters_filepath"]:
              parameters_filepath = kwargs["parameters_filepath"]
      except:
          parameters_filepath = param_default["parameters_filepath"]
  
      param_config, param_file_txt = _get_config_param(
          parameters_filepath
      )
  
      # Parameter file settings should overwrite default settings
      for k, v in param_config.items():
          param[k] = v
  
      # Command line args should overwrite settings in the parameter file
      for k, v in kwargs.items():
          param[k] = v
  
      # Any missing args can be set to default
      for k, v in param_default.items():
          if k not in param:
              param[k] = param_default[k]
  
      # clean the data types
      param = _clean_param_dtypes(param)
  
      # if loading a pretrained model, set to pretrain hyperparameters
      if param["use_pretrained_model"]:
          pretrain_path = os.path.join(
              param["pretrained_model_folder"], "parameters.ini"
          )
  
          if os.path.isfile(pretrain_path):
              pretrain_param, _ = _get_config_param(pretrain_path)
              pretrain_param = _clean_param_dtypes(pretrain_param)
  
              pretrain_list = [
                  "use_character_lstm",
                  "character_embedding_dimension",
                  "character_lstm_hidden_state_dimension",
                  "token_embedding_dimension",
                  "token_lstm_hidden_state_dimension",
                  "use_crf",
              ]
  
              for name in pretrain_list:
                  if param[name] != pretrain_param[name]:
                      msg = """WARNING: parameter '{0}' was overwritten from '{1}' to '{2}'
                          for consistency with the pretrained model""".format(
                          name, param[name], pretrain_param[name]
                      )
                      print(msg)
                      param[name] = pretrain_param[name]
          else:
              msg = """Warning: pretraining parameter file not found."""
              print(msg)
  
      # update param_file_txt to reflect the overriding
      param_to_section = utils.get_parameter_to_section_of_configparser(
          param_file_txt
      )
      for k, v in param.items():
          try:
              param_file_txt.set(param_to_section[k], k, str(v))
          except:
              pass
  
      pprint(param)
  
      return param, param_file_txt
  
imports: import codecs
  import configparser
  import copy
  import distutils.util
  import glob
  import os
  import pickle
  from pprint import pprint
  import random
  import shutil
  import sys
  import time
  import warnings
  import pkg_resources
  import numpy
  import matplotlib
  import tensorflow
  from tensorflow.contrib.tensorboard.plugins import projector
  from neuroner import train
  from neuroner import dataset
  from neuroner.entity_lstm import EntityLSTM
  from neuroner import utils
  from neuroner import conll_to_brat
  from neuroner import evaluate
  from neuroner import brat_to_conll
  from neuroner import utils_nlp
label_desc: Use image node_id 7 for calling a global function with example usage: load_parameters() and returns: param,  param_file_txt