def in_degree(self, nbunch=None, t=None):
        """Return the in degree of a node or nodes at time t.

        The node in degree is the number of incoming interaction to that node in a given time frame.

        Parameters
        ----------
        nbunch : iterable container, optional (default=all nodes)
            A container of nodes.  The container will be iterated
            through once.

        t : snapshot id (default=None)
            If None will be returned the degree of nodes on the flattened graph.


        Returns
        -------
        nd : dictionary, or number
            A dictionary with nodes as keys and degree as values or
            a number if a single node is specified.

        Examples
        --------
        >>> G = dn.DynDiGraph()
        >>> G.add_interaction(0,1, t=0)
        >>> G.add_interaction(1,2, t=0)
        >>> G.add_interaction(2,3, t=0)
        >>> G.in_degree(0, t=0)
        1
        >>> G.in_degree([0,1], t=1)
        {0: 0, 1: 0}
        >>> list(G.in_degree([0,1], t=0).values())
        [1, 2]
        """
        if nbunch in self:  # return a single node
            return next(self.in_degree_iter(nbunch, t))[1]
        else:  # return a dict
            return dict(self.in_degree_iter(nbunch, t))
Return the in degree of a node or nodes at time t.

        The node in degree is the number of incoming interaction to that node in a given time frame.

        Parameters
        ----------
        nbunch : iterable container, optional (default=all nodes)
            A container of nodes.  The container will be iterated
            through once.

        t : snapshot id (default=None)
            If None will be returned the degree of nodes on the flattened graph.


        Returns
        -------
        nd : dictionary, or number
            A dictionary with nodes as keys and degree as values or
            a number if a single node is specified.

        Examples
        --------
        >>> G = dn.DynDiGraph()
        >>> G.add_interaction(0,1, t=0)
        >>> G.add_interaction(1,2, t=0)
        >>> G.add_interaction(2,3, t=0)
        >>> G.in_degree(0, t=0)
        1
        >>> G.in_degree([0,1], t=1)
        {0: 0, 1: 0}
        >>> list(G.in_degree([0,1], t=0).values())
        [1, 2]