class_docstr: A test for the class _RemoteOpLayer.
class_docstr_tok: ["A","test","for","the","class","_RemoteOpLayer","."]
docstr: Validates the class through an example.
docstr_tok: ["Validates","the","class","through","an","example","."]
code: def test_layers(self):
      """Validates the class through an example."""
      remote_op_relations = {
          "a1": [],
          "a2": [],
          "b1": ["a1"],
          "b2": ["a1", "a2"],
          "c1": ["b1"],
          "c2": ["b1", "a1", "b2", "a2"],
      }
      desired_outputs = [{"a1", "a2"}, {"b1", "b2"}, {"c1", "c2"}]
  
      order = graph_partition._RemoteOpLayers(remote_op_relations)
      self.assertEqual(desired_outputs, list(order))
  
file_path: tfx/tfx/experimental/distributed_inference/graphdef_experiments/subgraph_partitioning/graph_partition_test.py
imports: import os
  import tempfile
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.experimental.distributed_inference.graphdef_experiments.subgraph_partitioning import create_complex_graph
  from tfx.experimental.distributed_inference.graphdef_experiments.subgraph_partitioning import graph_partition
  from google.protobuf import text_format
label_desc: Use image node_id 1 for calling the RemoteOpLayerTest obj's underlying member method code with example usage: obj.test_layers() without return types