code: def testAll(self):
      default_ops = "all"
      graphs = [
          text_format.Parse(d, graph_pb2.GraphDef())
          for d in [GRAPH_DEF_TXT, GRAPH_DEF_TXT_2]
      ]
      ops_and_kernels = (
          selective_registration_header_lib.get_ops_and_kernels(
              "rawproto", self.WriteGraphFiles(graphs), default_ops
          )
      )
  
      header = selective_registration_header_lib.get_header_from_ops_and_kernels(
          ops_and_kernels, include_all_ops_and_kernels=True
      )
      self.assertListEqual(
          [
              "// This file was autogenerated by %s" % self.script_name,
              "#ifndef OPS_TO_REGISTER",  #
              "#define OPS_TO_REGISTER",  #
              "#define SHOULD_REGISTER_OP(op) true",  #
              "#define SHOULD_REGISTER_OP_KERNEL(clz) true",  #
              "#define SHOULD_REGISTER_OP_GRADIENT true",  #
              "#endif",
          ],
          header.split("\n"),
      )
  
      self.assertListEqual(
          header.split("\n"),
          selective_registration_header_lib.get_header(
              self.WriteGraphFiles(graphs), "rawproto", default_ops
          ).split("\n"),
      )
  
file_path: tensorflow-upstream/tensorflow/python/tools/print_selective_registration_header_test.py
imports: import os
  import sys
  from google.protobuf import text_format
  from tensorflow.core.framework import graph_pb2
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
  from tensorflow.python.tools import selective_registration_header_lib
label_desc: Use image node_id 6 for calling the PrintOpFilegroupTest obj's underlying member method code with example usage: obj.testAll() without return types