def clean_minimal_keys(item):
    """
    Removes incompatible keys from `item` based on `item['format']`

    Parameters
    ----------
    item : dict
        Information about annotation

    Returns
    -------
    item : dict
        Updated information about annotation
    """

    keys = {'surface': ['res'], 'volume': ['den', 'hemi']}
    fmt = item.get('format')
    if fmt is None:
        print('Invalid value for format key; setting to "null"')
        item['format'] = None
        return

    for key in keys.get(fmt, []):
        item.pop(key, None)

    return item