def METHOD_NAME(ctx: click.Context, experiment_id: str, experiment_name: str):
    """Archive an experiment."""
    client_obj: client.Client = ctx.obj['client']
    output_format = ctx.obj['output']
    if (experiment_id is None) == (experiment_name is None):
        raise ValueError(either_option_required)
    if not experiment_id:
        experiment = client_obj.get_experiment(experiment_name=experiment_name)
        experiment_id = experiment.experiment_id
    client_obj.archive_experiment(experiment_id=experiment_id)
    if experiment_id:
        experiment = client_obj.get_experiment(experiment_id=experiment_id)
    else:
        experiment = client_obj.get_experiment(experiment_name=experiment_name)
    output.print_output(
        experiment,
        output.ModelType.EXPERIMENT,
        output_format,
    )