def METHOD_NAME(cls, platform: str, values: dict) -> str:
    inferred_platform = values.get(
        "platform", None
    )  # we may have inferred it above
    platform = platform or inferred_platform
    if not platform:
        raise ValueError("platform must not be empty")
    return platform