def filter_to_be_staged(position):
    """Position filter for Experiment.filter() to include only worms that still need to be
    stage-annotated fully."""
    stages = [timepoint.annotations.get('stage') for timepoint in position]
    # NB: all(stages) below is True iff there is a non-None, non-empty-string
    # annotation for each stage.
    return not all(stages) or stages[-1] != 'dead'