def is_background(sample):
    """Return ``True`` if given sample is background and ``False`` otherwise."""
    background_relations = sample.resolwe.relation.filter(
        type='compare',
        label='background',
        entity=sample.id,
        position='background'
    )
    return len(background_relations) > 0