def by_image_seq(blocks, image_seq):
    """Filter blocks to return only those associated with the provided image_seq number.

    Argument:
    List:blocks       -- List of block objects to sort.
    Int:image_seq    -- image_seq number found in ec_hdr.
    
    Returns:
    List        -- List of block indexes matching image_seq number.
    """
    return list(filter(lambda block: blocks[block].ec_hdr.image_seq == image_seq, blocks))
def by_image_seq ( blocks , image_seq ) : return list ( filter ( lambda block : blocks [ block ] . ec_hdr . image_seq == image_seq , blocks ) )
Filter blocks to return only those associated with the provided image_seq number.

    Argument:
    List:blocks       -- List of block objects to sort.
    Int:image_seq    -- image_seq number found in ec_hdr.
    
    Returns:
    List        -- List of block indexes matching image_seq number.