def METHOD_NAME(ctx: click.Context, gcs_bucket_name: str, modified_only: bool) -> bool:
    if modified_only:
        if ctx.obj["ci_context"] is not CIContext.MASTER and ctx.obj["git_branch"] != "master":
            click.secho("Not on the master branch. Skipping metadata upload.")
            return True
        metadata_to_upload = get_modified_metadata_files(ctx.obj["modified_files"])
        if not metadata_to_upload:
            click.secho("No modified metadata found. Skipping metadata upload.")
            return True
    else:
        metadata_to_upload = get_all_metadata_files()
    click.secho(f"Will upload {len(metadata_to_upload)} metadata files.")
    return anyio.run(
        run_metadata_upload_pipeline,
        ctx.obj["is_local"],
        ctx.obj["git_branch"],
        ctx.obj["git_revision"],
        ctx.obj.get("gha_workflow_run_url"),
        ctx.obj.get("dagger_logs_url"),
        ctx.obj.get("pipeline_start_timestamp"),
        ctx.obj.get("ci_context"),
        metadata_to_upload,
        gcs_bucket_name,
    )