code: def brack_to_mod(ovr):
      if not isinstance(ovr, dict):
          if isinstance(ovr, list):
              for i in range(len(ovr)):
                  ovr[i] = brack_to_mod(ovr[i])
          elif isinstance(ovr, str):
              if "(" in ovr and ")" in ovr:
                  mod = ovr.split("(")[0]
                  args = {}
                  if "()" not in ovr:
                      for str_pair in (
                          ovr.split("(")[1].split(")")[0].split(",")
                      ):
                          k = str_pair.split("=")[0].strip(" ")
                          v = str_pair.split("=")[1].strip(" ")
                          args[k] = v
  
                  ovr = {"module": mod, "args": args}
              elif "{" in ovr and "}" in ovr:
                  try:
                      ovr = json.loads(ovr)
                  except Exception:
                      pass
          return ovr
      else:
          for k in ovr.keys():
              ovr[k] = brack_to_mod(ovr[k])
  
      return ovr
  
file_path: mindsdb/mindsdb/integrations/handlers/lightwood_handler/utils.py
imports: import gc
  import json
  import sys
  import dill
  from lightwood.api.high_level import _module_from_code
label_desc: Use image node_id 4 for calling a global function with example usage: brack_to_mod(ovr) and returns: ovr, ovr