def prune_by_birads(iqms, birads='c1'):
    """Gets the IQMs for only one BI-RADS class for a beamformer

    Parameters
    ----------
    iqms : dict
        The dict of IQMs for one beamformer
    birads : str
        The BI-RADS class of the IQMs to be returned

    Returns
    -------
    pruned_iqms : dict
        The IQMs of the images of the specified BI-RADS class
    """

    # Define valid birads options, assert user choice is valid
    valid_birads = ['c1', 'c2', 'c3', 'c4']
    error_msg = "Error: birads must be in %s" % valid_birads
    assert birads in valid_birads, error_msg

    pruned_iqms = dict()  # Init dict to return

    for old_key in iqms.keys():  # For each expt ID

        # If it belongs to specified BI-RADS class
        if birads in old_key:
            pruned_iqms[old_key] = iqms[old_key]

    return pruned_iqms