def _is_segment_in_block_range(segment, blocks):
    """Return whether the segment is in the range of one of the blocks."""
    for block in blocks:
        if block.start <= segment.start and segment.end <= block.end:
            return True

    return False