def METHOD_NAME(*, repo_tag):
    """
    The SageMaker model name
    These are quite restrictive, so we cannot use the container image name.
    They must be max 63 chars and match ^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
    """
    model_name = repo_tag
    # Assuming the registry prefix follows the recommendation of
    # organisation-project-env
    model_name_replacements = {
        f"{settings.COMPONENTS_REGISTRY_URL}/": "",
        "algorithms/algorithmimage": "A",
        "evaluation/method": "M",
        ":": "-",
        "/": "-",
        ".": "-",
    }
    for k, v in model_name_replacements.items():
        model_name = model_name.replace(k, v)
    return model_name