code: def process_params_in(model, params_dic):
      """
      This function takes in a model and the parameters dictionary,
      and returns a string that can be ingested back into the model.
      """
      # deepcopy to prevent changes to the user dictionary.
      params_dic_copy = deepcopy(params_dic)
  
      # convert numpy to armadillo.
      np_to_arma(params_dic_copy)
  
      # inserting scrubbed parameters back into dictionary.
      for param_name, details in model.scrubbed_params.items():
          for val, path in zip(
              details["values"], details["full_paths"]
          ):
              insert_in_dic(params_dic_copy, path, param_name, val)
  
      # dumping to string. restore_value defined later.
      params_str = json.dumps(params_dic_copy, cls=restore_value)
      return params_str
  
file_path: mlpack/src/mlpack/bindings/python/mlpack/preprocess_json_params.py
imports: import numpy
  import json
  import pprint
  from copy import deepcopy
  from collections import OrderedDict
label_desc: Use image node_id 2 for calling a global function with example usage: process_params_in(model, params_dic) and returns: params_str