def _try_to_transform(self, parent_var: Var) -> bool:
        """
        scan the children ops to parent_var, to find and remove identical ops, if any.
        Returns True, if successful in finding such redundant ops.
        """
        candidate_ops_lists = self._get_candidate_ops_lists_from_var(parent_var)
        block_changed = False
        for ops_list in candidate_ops_lists:
            # Iterate through the child ops list, to make sure that we check all possible combinations.
            for idx in range(len(ops_list)):
                if remove_redundant_ops._try_to_remove_ops(ops_list[idx:]):
                    # We shoud not break right alway, so that we can keep
                    # the time complexity low.
                    block_changed = True

        return block_changed

        scan the children ops to parent_var, to find and remove identical ops, if any.
        Returns True, if successful in finding such redundant ops.
        
coremltools/converters/mil/mil/passes/defs/cleanup/remove_redundant_ops.py