code: def infer_converter_from_file_type(
      config_path, regex=None, default_keyword=""
  ):
      """Use filetype extension to infer and build the correct configuration file
      converter.
      """
      _, ext_type = os.path.splitext(os.path.abspath(config_path))
      for klass in config_converter_factory.get_classes().values():
          if ext_type in klass.file_extensions:
              return klass()
  
      if regex is None:
          return GenericConverter(expression_prefix=default_keyword)
  
      return GenericConverter(regex, expression_prefix=default_keyword)
  
imports: import importlib
  import os
  from abc import ABC, abstractmethod
  from collections import deque
  from orion.core.utils import GenericFactory, nesteddict
label_desc: Use image node_id 1 for calling a global function with example usage: infer_converter_from_file_type(config_path, regex, default_keyword) and returns: GenericConverter, GenericConverter, klass