def METHOD_NAME(client, queue):
    """
    Cancels a jobset with a filter.
    """
    # Create the PodSpec for the job
    job_request_items = create_dummy_job(client)
    # Create the jobset with a filter
    job_set_id = f"set-{uuid.uuid1()}"
    client.submit_jobs(
        queue=queue, job_set_id=job_set_id, job_request_items=job_request_items
    )
    # Cancel the jobset with a filter
    client.cancel_jobset(
        queue=queue,
        job_set_id=job_set_id,
        filter_states=[JobState.PENDING, JobState.RUNNING],
    )