nncf/experimental/torch/search_building_blocks/search_blocks.py
def remove_nested_blocks(sorted_blocks: List[PotentialBuildingBlock]) -> List[PotentialBuildingBlock]:
    """
    Remove nested building blocks.

    :param: List of building blocks.
    :return: List of building blocks without nested blocks.
    """
    return [list(group_block)[-1] for _, group_block in groupby(sorted_blocks, lambda block: block.start_node.main_id)]

    Remove nested building blocks.

    :param: List of building blocks.
    :return: List of building blocks without nested blocks.
    
Remove nested building blocks.
:param: List of building blocks.
:return: List of building blocks without nested blocks.
Remove nested building blocks . : param : List of building blocks . : return : List of building blocks without nested blocks .
def remove_nested_blocks(sorted_blocks: List[PotentialBuildingBlock]) -> List[PotentialBuildingBlock]:
    return [list(group_block)[-1] for _, group_block in groupby(sorted_blocks, lambda block: block.start_node.main_id)]
def remove_nested_blocks ( sorted_blocks : List [ PotentialBuildingBlock ] ) -> List [ PotentialBuildingBlock ] : return [ list ( group_block ) [ - 1 ] for _ , group_block in groupby ( sorted_blocks , lambda block : block . start_node . main_id ) ]
Remove nested building blocks.
Remove nested building blocks .
"""
    Remove nested building blocks.

    :param: List of building blocks.
    :return: List of building blocks without nested blocks.
    """
sorted_blocks
List[PotentialBuildingBlock]