def METHOD_NAME(self, model_dir):
    """Loads a model. For PyTorch, a default function to load a model only if Elastic Inference is used.
    In other cases, users should provide customized model_fn() in script.
    Args:
        model_dir: a directory where model is saved.
    Returns: A PyTorch model.
    """
    model_path = os.path.join(model_dir, DEFAULT_MODEL_FILENAME)
    if not os.path.exists(model_path):
        raise FileNotFoundError(
            "Failed to load model with default model_fn: missing file {}.".format(
                DEFAULT_MODEL_FILENAME
            )
        )
    # Client-framework is CPU only. But model will run in Elastic Inference server with CUDA.
    model = torch.jit.load(model_path, map_location=device)
    model.eval()
    model = model.to(device)
    # attach_eia() is introduced in PyTorch Elastic Inference 1.5.1
    model = torcheia.jit.attach_eia(model, 0)
    return model