nncf/experimental/torch/search_building_blocks/search_blocks.py
def compare_for_building_block(a: PotentialBuildingBlock, b: PotentialBuildingBlock):
    """
    Orders the blocks in ascending order of the end node index.
    If the indices of the end nodes are the same, the blocks are ordered by the
    index of the start node.
    """
    if a.end_node.bottom_id != b.end_node.bottom_id:
        return a.end_node.bottom_id - b.end_node.bottom_id
    return b.start_node.main_id - a.start_node.main_id

    Orders the blocks in ascending order of the end node index.
    If the indices of the end nodes are the same, the blocks are ordered by the
    index of the start node.
    
Orders the blocks in ascending order of the end node index.
If the indices of the end nodes are the same, the blocks are ordered by the
index of the start node.
Orders the blocks in ascending order of the end node index . If the indices of the end nodes are the same the blocks are ordered by the index of the start node .
def compare_for_building_block(a: PotentialBuildingBlock, b: PotentialBuildingBlock):
    if a.end_node.bottom_id != b.end_node.bottom_id:
        return a.end_node.bottom_id - b.end_node.bottom_id
    return b.start_node.main_id - a.start_node.main_id
def compare_for_building_block ( a : PotentialBuildingBlock , b : PotentialBuildingBlock ) : if a . end_node . bottom_id != b . end_node . bottom_id : return a . end_node . bottom_id - b . end_node . bottom_id return b . start_node . main_id - a . start_node . main_id
Orders the blocks in ascending order of the end node index.
Orders the blocks in ascending order of the end node index .
"""
    Orders the blocks in ascending order of the end node index.
    If the indices of the end nodes are the same, the blocks are ordered by the
    index of the start node.
    """
a
PotentialBuildingBlock
b
PotentialBuildingBlock