def _replacement(self, node):
        # Check if the left node is useless
        if isinstance(node.left, ast.Constant) and node.left.value == False:
            return node.right

        # Check if the right node is useless
        if isinstance(node.right, ast.Constant) and node.right.value == False:
            return node.left
        return None
dataset/ETHPy150Open armon/pypred/pypred/optimizer.py/ExtraBothPattern._replacement/original