<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stream(self, entity, callback):
 """ Stream out all eligible children of the input entity. :param entity: The target entity to be streamed. :param callback: The function that takes the node and actually send it out. """

        with self._lock:
            self._stream(entity, callback)