def contains(self, assertion):
        """
        Returns `True` if `assertion` is contained in this `Independencies`-object,
        otherwise `False`.

        Parameters
        ----------
        assertion: IndependenceAssertion()-object

        Examples
        --------
        >>> from pgmpy.independencies import Independencies, IndependenceAssertion
        >>> ind = Independencies(['A', 'B', ['C', 'D']])
        >>> IndependenceAssertion('A', 'B', ['C', 'D']) in ind
        True
        >>> # does not depend on variable order:
        >>> IndependenceAssertion('B', 'A', ['D', 'C']) in ind
        True
        >>> # but does not check entailment:
        >>> IndependenceAssertion('X', 'Y', 'Z') in Independencies(['X', 'Y'])
        False
        """
        if not isinstance(assertion, IndependenceAssertion):
            raise TypeError("' in <Independencies()>' requires IndependenceAssertion" +
                            " as left operand, not {0}".format(type(assertion)))

        return assertion in self.get_assertions()
def contains ( self , assertion ) : if not isinstance ( assertion , IndependenceAssertion ) : raise TypeError ( "' in <Independencies()>' requires IndependenceAssertion" + " as left operand, not {0}" . format ( type ( assertion ) ) ) return assertion in self . get_assertions ( )
Returns `True` if `assertion` is contained in this `Independencies`-object,
        otherwise `False`.

        Parameters
        ----------
        assertion: IndependenceAssertion()-object

        Examples
        --------
        >>> from pgmpy.independencies import Independencies, IndependenceAssertion
        >>> ind = Independencies(['A', 'B', ['C', 'D']])
        >>> IndependenceAssertion('A', 'B', ['C', 'D']) in ind
        True
        >>> # does not depend on variable order:
        >>> IndependenceAssertion('B', 'A', ['D', 'C']) in ind
        True
        >>> # but does not check entailment:
        >>> IndependenceAssertion('X', 'Y', 'Z') in Independencies(['X', 'Y'])
        False