code: def iterate_bfs(self):
          
  
          working_set = deque(self.roots)
          seen = []
  
          while len(working_set) > 0:
              curr = working_set.popleft()
  
              # Now build input and output node lists for this node
              inputs = []
              for walker, _ in curr.inputs:
                  for other in seen:
                      if walker.matches(other.stream) and other not in inputs:
                          inputs.append(other)
  
              outputs = [x for x in curr.outputs]
              yield curr, inputs, outputs
  
              working_set.extend(curr.outputs)
              seen.append(curr)
docs: Generator that yields node, [inputs], [outputs] in breadth first order.
  
          This generator will iterate over all nodes in the sensor graph, yielding
          a 3 tuple for each node with a list of all of the nodes connected to its
          inputs and all of the nodes connected to its output.
  
          Returns:
              (SGNode, list(SGNode), list(SGNode)): A tuple for each node in the graph