<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def roots(self):
 """get the nodes with no children"""

      return [x for x in self._nodes.values() if x.id not in self._c2p]