class_docstr: MLIR Generation Tests for MLIR TFR Program.
code: def test_op_reg_gen(self):
      cxx_code = gen_register_op(sys.modules[__name__])
      cxx_code_exp = r"""
        CHECK: #include "tensorflow/core/framework/op.h"
        CHECK-EMPTY
        CHECK: namespace tensorflow {
        CHECK-EMPTY
        CHECK-LABEL: REGISTER_OP("TestNoOp")
        CHECK-NEXT:      .Attr("T: numbertype")
        CHECK-NEXT:      .Output("o1: T");
        CHECK-EMPTY
        CHECK-LABEL: REGISTER_OP("TestCompositeOp")
        CHECK-NEXT:      .Input("x: T")
        CHECK-NEXT:      .Input("y: T")
        CHECK-NEXT:      .Attr("act: {'', 'relu'}")
        CHECK-NEXT:      .Attr("trans: bool = true")
        CHECK-NEXT:      .Attr("T: numbertype")
        CHECK-NEXT:      .Output("o1: T")
        CHECK-NEXT:      .Output("o2: T");
        CHECK-EMPTY
        CHECK:  }  // namespace tensorflow
      """
      self.assertTrue(
          fw.check(str(cxx_code), cxx_code_exp), str(cxx_code)
      )
  
file_path: tensorflow/tensorflow/compiler/mlir/tfr/python/op_reg_gen_test.py
imports: import sys
  from tensorflow.compiler.mlir.python.mlir_wrapper import filecheck_wrapper
  from tensorflow.compiler.mlir.tfr.python import composite
  from tensorflow.compiler.mlir.tfr.python.op_reg_gen import gen_register_op
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the TFRGenTensorTest obj's underlying member method code with example usage: obj.test_op_reg_gen() without return types