<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cli(obj, environment, service, resource, event, group, tags, customer, start, duration, text, delete):
 """Suppress alerts for specified duration based on alert attributes."""

    client = obj['client']
    if delete:
        client.delete_blackout(delete)
    else:
        if not environment:
            raise click.UsageError('Missing option "--environment" / "-E".')
        try:
            blackout = client.create_blackout(
                environment=environment,
                service=service,
                resource=resource,
                event=event,
                group=group,
                tags=tags,
                customer=customer,
                start=start,
                duration=duration,
                text=text
            )
        except Exception as e:
            click.echo('ERROR: {}'.format(e))
            sys.exit(1)
        click.echo(blackout.id)