class_docstr: A class that outputs remote op layers (custom topological sort).
  
  A remote op layer contains a set of remote op names that don't have
  dependencies on each other. The remote op layers are returned in execution
  order. In other words, a remote op layer returned earlier will be executed
  earlier.
class_docstr_tok: ["A","class","that","outputs","remote","op","layers","(","custom","topological","sort",")",".","A","remote","op","layer","contains","a","set","of","remote","op","names","that","do","n't","have","dependencies","on","each","other",".","The","remote","op","layers","are","returned","in","execution","order",".","In","other","words",",","a","remote","op","layer","returned","earlier","will","be","executed","earlier","."]
docstr: Gets the remote op names for the next remote op layer.
  
  Returns:
    A set of remote op names.
docstr_tok: ["Gets","the","remote","op","names","for","the","next","remote","op","layer",".","Returns",":","A","set","of","remote","op","names","."]
code: def __next__(self) -> Set[str]:
      """Gets the remote op names for the next remote op layer.
  
      Returns:
        A set of remote op names.
      """
      if not self._not_processed:
          raise StopIteration
  
      layer_node_names = set()
      for remote_op_name in self._not_processed:
          remote_op_immediate_dep = set(
              self.remote_op_to_immediate_dep[remote_op_name]
          )
          if not remote_op_immediate_dep & self._not_processed:
              layer_node_names.add(remote_op_name)
  
      self._not_processed -= layer_node_names
  
      return layer_node_names
  
imports: import collections
  from typing import Dict, List, Mapping, Set
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.experimental.distributed_inference.graphdef_experiments.subgraph_partitioning import execution_spec
label_desc: Use image node_id 3 for calling the _RemoteOpLayers obj's underlying member method code with example usage: obj.__next__() and returns: layer_node_names