code: def _convert(
      model,
      convert_from="TensorFlow",
      convert_to="nn_proto",
      converter_registry=ConverterRegistry,
      **kwargs,
  ):
      """
      Convert from an external representation.
  
      Args:
          model (Any): The model to convert.
          convert_from (str): The name of the input converter.
          convert_to (str): The name of the output converter.
          converter_registry: Converter registries.
      Returns:
          The converted model.
      """
      frontend_converter_type = converter_registry.frontends.get(
          convert_from.lower()
      )
      if not frontend_converter_type:
          msg = 'Frontend converter "{}" not implemented, must be one of: {}'
          raise NotImplementedError(
              msg.format(
                  convert_from,
                  list(converter_registry.frontends.keys()),
              )
          )
      frontend_converter = frontend_converter_type()
  
      backend_converter_type = converter_registry.backends.get(
          convert_to.lower()
      )
      if not backend_converter_type:
          msg = 'Backend converter "{}" not implemented, must be one of: {}'
          raise NotImplementedError(
              msg.format(
                  convert_to, list(converter_registry.backends.keys())
              )
          )
      backend_converter = backend_converter_type()
  
      prog = frontend_converter(model, **kwargs)
      common_pass(prog)
      out = backend_converter(prog, **kwargs)
  
      return out
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/mil/converter.py
imports: from coremltools.converters._profile_utils import _profile
  from .mil.passes.common_pass import common_pass
label_desc: Use image node_id 1 for calling a global function with example usage: _convert(model, convert_from, convert_to, converter_registry) and returns: out