<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def nodes_iter(self, t=None, data=False):
 """Return an iterator over the nodes with respect to a given temporal snapshot. Parameters t : snapshot id (default=None). If None the iterator returns all the nodes of the flattened graph. data : boolean, optional (default=False) If False the iterator returns nodes. If True return a two-tuple of node and node data dictionary Returns ------- niter : iterator An iterator over nodes. If data=True the iterator gives two-tuples containing (node, node data, dictionary) Examples -------- [0, 1, 2] """

        if t is not None:
            return iter([n for n in self.degree(t=t).values() if n > 0])
        return iter(self._node)