def topological_operator_iterator(self):
        '''
        This is an iterator of all operators in Topology object. Operators may be produced in a topological order.
        If you want to simply go though all operators without considering their topological structure, please use
        another function, unordered_operator_iterator.
        '''
        self._initialize_graph_status_for_traversing()
        priorities = {'tensorToProbabilityMap': 2, 'tensorToLabel': 1}
        while not all(operator.is_evaluated for scope in self.scopes for operator in scope.operators.values()):
            is_evaluation_happened = False
            for operator in sorted(self.unordered_operator_iterator(),
                                   key=lambda op: priorities[op.type] if op.type in priorities else 0):
                if all(variable.is_fed for variable in operator.inputs) and not operator.is_evaluated:
                    # Check if over-writing problem occurs (i.e., multiple operators produce results on one variable).
                    for variable in operator.outputs:
                        # Throw an error if this variable has been treated as an output somewhere
                        if variable.is_fed:
                            raise RuntimeError('One variable can only be assigned once')
                        # Mark this variable as filled
                        variable.is_fed = True
                    # Make this operator as handled
                    operator.is_evaluated = True
                    is_evaluation_happened = True
                    # Send out an operator
                    yield operator
            # After scanning through the whole computational graph, at least one operator should be evaluated. If not,
            # we need to terminate this procedure to avoid dead lock.
            if not is_evaluation_happened:
                break
This is an iterator of all operators in Topology object. Operators may be produced in a topological order.
        If you want to simply go though all operators without considering their topological structure, please use
        another function, unordered_operator_iterator.