code: def path(self, startLayer, endLayer):
          
          next = {startLayer.name : startLayer}
          visited = {}
          while next != {}:
              for item in list(next.items()):
                  # item[0] : name, item[1] : layer reference
                  # add layer to visited dict and del from next 
                  visited[item[0]] = item[1]
                  del next[item[0]]
                  for connection in self.connections:
                      if connection.fromLayer.name == item[0]:
                          if connection.toLayer.name == endLayer.name:
                              return 1 # a path!
                          elif connection.toLayer.name in next:
                              pass # already in the list to be traversed
                          elif connection.toLayer.name in visited:
                              pass # already been there
                          else:
                              # add to next
                              next[connection.toLayer.name] = connection.toLayer
          return 0 # didn't find it and ran out of places to go
docs: Used in error checking with verifyArchitecture() and in prop_from().