Returns `True` if the `entailed_independencies` are implied by this `Independencies`-object, otherwise `False`.
        Entailment is checked using the semi-graphoid axioms.

        Might be very slow if more than six variables are involved.

        Parameters
        ----------
        entailed_independencies: Independencies()-object

        Examples
        --------
        >>> from pgmpy.independencies import Independencies
        >>> ind1 = Independencies([['A', 'B'], ['C', 'D'], 'E'])
        >>> ind2 = Independencies(['A', 'C', 'E'])
        >>> ind1.entails(ind2)
        True
        >>> ind2.entails(ind1)
        False

def entails(self, entailed_independencies):
        """
        Returns `True` if the `entailed_independencies` are implied by this `Independencies`-object, otherwise `False`.
        Entailment is checked using the semi-graphoid axioms.

        Might be very slow if more than six variables are involved.

        Parameters
        ----------
        entailed_independencies: Independencies()-object

        Examples
        --------
        >>> from pgmpy.independencies import Independencies
        >>> ind1 = Independencies([['A', 'B'], ['C', 'D'], 'E'])
        >>> ind2 = Independencies(['A', 'C', 'E'])
        >>> ind1.entails(ind2)
        True
        >>> ind2.entails(ind1)
        False
        """
        if not isinstance(entailed_independencies, Independencies):
            return False

        implications = self.closure().get_assertions()
        return all(ind in implications for ind in entailed_independencies.get_assertions())