def add_edge(self, u, v, *kwargs):
        """
        Add an edge between u and v.

        The nodes u and v will be automatically added if they are
        not already in the graph

        Parameters
        ----------
        u,v : nodes
              Nodes can be any hashable python object.

        Examples
        --------
        >>> from pgmpy.models import NaiveBayes
        >>> G = NaiveBayes()
        >>> G.add_nodes_from(['a', 'b', 'c'])
        >>> G.add_edge('a', 'b')
        >>> G.add_edge('a', 'c')
        >>> G.edges()
        [('a', 'c'), ('a', 'b')]
        """

        if self.parent_node and u != self.parent_node:
            raise ValueError("Model can have only one parent node.")
        self.parent_node = u
        self.children_nodes.add(v)
        super(NaiveBayes, self).add_edge(u, v, *kwargs)