def METHOD_NAME(access_method: str, overwrite: bool, unlink: bool):
    if access_method not in ["stream", "download", "local"]:
        raise ValueError(
            f"Invalid access method: {access_method}. Must be one of 'stream', 'download', 'local'"
        )
    if access_method == "stream" and unlink:
        raise ValueError(
            "`unlink` argument is not supported with 'stream' access method."
        )
    if access_method in {"download", "local"}:
        if not os.environ.get("DEEPLAKE_DOWNLOAD_PATH"):
            raise ValueError(
                f"DEEPLAKE_DOWNLOAD_PATH environment variable is not set. Cannot use access method '{access_method}'"
            )
        if overwrite:
            raise ValueError(
                "Cannot use access methods download or local with overwrite=True as these methods only interact with local copy of the dataset."
            )