def _check_connect(self, src, dest):
        """Check validity of connecting a source expression to a destination
        expression.
        """

        destexpr = ConnectedExprEvaluator(dest, self, is_dest=True)
        srcexpr = ConnectedExprEvaluator(src, self,
                                         getter='get_attr_w_copy')

        srccomps = srcexpr.get_referenced_compnames()
        destcomps = list(destexpr.get_referenced_compnames())

        if destcomps and srccomps in destcomps[0]:
            raise RuntimeError("'%s' and '%s' refer to the same component."
                               % (src, dest))

        return srcexpr, destexpr
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/assembly.py/Assembly._check_connect/swapped operands of `in`