code: def testGetOps(self):
      default_ops = "NoOp:NoOp,_Recv:RecvOp,_Send:SendOp"
      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
          )
      )
      matmul_prefix = "Batch"
  
      self.assertListEqual(
          [
              ("AccumulateNV2", None),  #
              ("BiasAdd", "BiasOp<CPUDevice, float>"),  #
              ("Const", "ConstantOp"),  #
              (
                  "MatMul",
                  matmul_prefix
                  + "MatMulOp<CPUDevice, double, double, double, true>",
              ),  #
              (
                  "MatMul",
                  matmul_prefix
                  + "MatMulOp<CPUDevice, float, float, float, true>",
              ),  #
              (
                  "Maximum",
                  "BinaryOp<CPUDevice, functor::maximum<int64_t>>",
              ),  #
              ("NoOp", "NoOp"),  #
              ("Reshape", "ReshapeOp"),  #
              ("_Recv", "RecvOp"),  #
              ("_Send", "SendOp"),  #
          ],
          ops_and_kernels,
      )
  
      graphs[0].node[0].ClearField("device")
      graphs[0].node[2].ClearField("device")
      ops_and_kernels = (
          selective_registration_header_lib.get_ops_and_kernels(
              "rawproto", self.WriteGraphFiles(graphs), default_ops
          )
      )
      self.assertListEqual(
          [
              ("AccumulateNV2", None),  #
              ("BiasAdd", "BiasOp<CPUDevice, float>"),  #
              ("Const", "ConstantOp"),  #
              (
                  "MatMul",
                  matmul_prefix
                  + "MatMulOp<CPUDevice, double, double, double, true>",
              ),  #
              (
                  "MatMul",
                  matmul_prefix
                  + "MatMulOp<CPUDevice, float, float, float, true>",
              ),  #
              (
                  "Maximum",
                  "BinaryOp<CPUDevice, functor::maximum<int64_t>>",
              ),  #
              ("NoOp", "NoOp"),  #
              ("Reshape", "ReshapeOp"),  #
              ("_Recv", "RecvOp"),  #
              ("_Send", "SendOp"),  #
          ],
          ops_and_kernels,
      )
  
file_path: tensorflow/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 4 for calling the PrintOpFilegroupTest obj's underlying member method code with example usage: obj.testGetOps() without return types