code: def convert(
      cls, config, output_format="json", indent=2, compact=False
  ):
      converters = {
          "json": cls.to_json,
          "properties": cls.to_properties,
          "yaml": cls.to_yaml,
          "hocon": cls.to_hocon,
      }
  
      if output_format in converters:
          return converters[output_format](config, compact, indent)
      else:
          raise Exception(
              "Invalid format '{format}'. Format must be 'json', 'properties', 'yaml' or 'hocon'".format(
                  format=output_format
              )
          )
  
file_path: clearml/clearml/utilities/pyhocon/converter.py
imports: import json
  import re
  import sys
  from .None import ConfigFactory
  from .config_tree import ConfigQuotedString
  from .config_tree import ConfigSubstitution
  from .config_tree import ConfigTree
  from .config_tree import ConfigValues
  from .config_tree import NoneValue
label_desc: Use image node_id 6 for calling the HOCONConverter obj's underlying member method code with example usage: obj.convert(cls, config, output_format, indent, compact) and returns: converters