def weight_diagonals(self, edge1, edge2):
        for edge in (edge1, edge2):
            self.weight_diagonal(edge)

        favour1 = edge1[2]['h_weight'][1] - edge2[2]['h_weight'][0]
        favour2 = edge1[2]['h_weight'][0] - edge2[2]['h_weight'][1]

        if favour1 == 0 and favour2 == 0:
            # Unambiguous, remove both.
            return (edge1, edge2)
        if favour1 >= 0 and favour2 >= 0:
            # Unambiguous, edge1 wins.
            return (edge2,)
        if favour1 <= 0 and favour2 <= 0:
            # Unambiguous, edge2 wins.
            return (edge1,)
        # We have an ambiguous result.
        return None
Check whether or not any lvm-based disk templates are enabled.
dataset/ETHPy150Open jerith/depixel/depixel/depixeler.py/IterativeFinalShapeHeuristics.weight_diagonals--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/utils/storage.py/IsLvmEnabled