code: def test_each_proto_matches_tensorflow(self):
      failed_diffs = []
      for tf_path, tb_path in PROTO_IMPORTS:
          tf_pb2 = importlib.import_module(tf_path)
          tb_pb2 = importlib.import_module(tb_path)
          tf_descriptor = descriptor_pb2.FileDescriptorProto()
          tb_descriptor = descriptor_pb2.FileDescriptorProto()
          tf_pb2.DESCRIPTOR.CopyToProto(tf_descriptor)
          tb_pb2.DESCRIPTOR.CopyToProto(tb_descriptor)
  
          # Convert expected to be actual since this matches the
          # replacements done in proto/update.sh
          tb_string = str(tb_descriptor)
          tf_string = str(tf_descriptor)
          for orig, repl in PROTO_REPLACEMENTS:
              tf_string = tf_string.replace(orig, repl)
  
          diff = difflib.unified_diff(
              tb_string.splitlines(1),
              tf_string.splitlines(1),
              fromfile=tb_path,
              tofile=tf_path,
          )
          diff = "".join(diff)
  
          if diff:
              failed_diffs.append(diff)
      if failed_diffs:
          self.fail(
              MATCH_FAIL_MESSAGE_TEMPLATE.format("".join(failed_diffs))
          )
  
imports: import difflib
  import importlib
  import tensorflow
  from google.protobuf import descriptor_pb2
label_desc: Use image node_id 1 for calling the ProtoMatchTest obj's underlying member method code with example usage: obj.test_each_proto_matches_tensorflow() without return types