def METHOD_NAME(repo_ctx, url, sha256, output, strip_prefix):
    # Workaround Python wheel extraction. Bazel cannot determine file
    # type automatically as does not support wheels out-of-the-box.
    archive_type = ""
    if url.endswith(".whl"):
        archive_type = "zip"
    repo_ctx.download_and_extract(
        url = url,
        sha256 = sha256,
        output = output,
        stripPrefix = strip_prefix,
        type = archive_type,
    )