def METHOD_NAME(model: Any, workload_location: str) -> Any:
    """Get model path."""
    from neural_insights.utils.exceptions import ClientErrorException
    from neural_insights.utils.utils import check_module
    model_path = None
    model_summary_file = None
    onnx_installed = False
    pytorch_installed = False
    try:
        check_module("onnx")
        onnx_installed = True
    except ClientErrorException:
        pass
    try:
        check_module("torch")
        pytorch_installed = True
    except ClientErrorException:
        pass
    if isinstance(model.model_path, str):
        return os.path.abspath(model.model_path)
    if onnx_installed:
        import onnx
        from neural_compressor.model.onnx_model import ONNXModel
        if isinstance(model, ONNXModel):
            model_path: str = os.path.join(workload_location, "input_model.onnx")
            os.makedirs(workload_location, exist_ok=True)
            onnx.save(model.model, model_path)
            return model_path, model_summary_file
    if pytorch_installed:
        import torch
        from torchinfo import summary
        from neural_compressor.model.torch_model import PyTorchModel
        if isinstance(model, PyTorchModel):
            model_path: str = os.path.join(workload_location, "input_model.pt")
            os.makedirs(workload_location, exist_ok=True)
            torch.save(model.model.state_dict(), model_path)
            model_stats = summary(model.model, depth=5, verbose=0)
            summary_str = str(model_stats)
            model_summary_file = os.path.join(workload_location, "model_summary.txt")
            with open(model_summary_file, "w", encoding="utf-8") as summary_file:
                summary_file.write(summary_str)
            return model_path, model_summary_file
    assert isinstance(model_path, str), "Model path not detected"