def METHOD_NAME(torchscript_model: Union[str,
                                              torch.jit.RecursiveScriptModule],
                     output_file_prefix: str,
                     input_names: Sequence[str],
                     output_names: Sequence[str],
                     input_shapes: Dict[str, Dict],
                     compute_precision: str = 'FLOAT32',
                     convert_to: str = 'neuralnetwork',
                     minimum_deployment_target: Optional[str] = None,
                     skip_model_load: bool = True,
                     **kwargs):
    """Create a coreml engine from torchscript.
    Args:
        torchscript_model (Union[str, torch.jit.RecursiveScriptModule]):
            The torchscript model to be converted.
        output_file_prefix (str): The output file prefix.
        input_names (Sequence[str]): The input names of the model.
        output_names (Sequence[str]): The output names of the model.
        input_shapes (Dict): The input shapes include max_shape, min_shape and
            default_shape
        compute_precision (str): The model precision,
            FLOAT16 or FLOAT32, see coremltools.precision, default `FLOAT32`.
        convert_to (str): The converted model type, can be
            'neuralnetwork' or 'mlprogram'. Defaults to 'neuralnetwork'.
        minimum_deployment_target (str, optional): minimum deploy target.
            iOS15, iOS16, etc., see coremltools.target
        skip_model_load (bool, optional): Skip model load. Defaults to True.
    """
    try:
        from mmdeploy.backend.torchscript import get_ops_path
        torch.ops.load_library(get_ops_path())
    except Exception as e:
        get_root_logger().warning(
            'Can not load custom ops because:\n'
            f'{e}\n'
            'Some model might not be able to be converted.')
    if isinstance(torchscript_model, str):
        torchscript_model = torch.jit.load(torchscript_model)
    inputs = []
    outputs = []
    for name in input_names:
        shape = create_shape(name, input_shapes[name])
        inputs.append(shape)
    for name in output_names:
        outputs.append(ct.TensorType(name=name))
    if convert_to == 'neuralnetwork':
        compute_precision = None
    else:
        compute_precision = ct.precision[compute_precision]
    mlmodel = ct.convert(
        model=torchscript_model,
        inputs=inputs,
        outputs=outputs,
        compute_precision=compute_precision,
        convert_to=convert_to,
        minimum_deployment_target=ct.target[minimum_deployment_target]
        if minimum_deployment_target else None,
        skip_model_load=skip_model_load)
    suffix = get_model_suffix(convert_to)
    output_path = output_file_prefix + suffix
    mlmodel.save(output_path)