code: def testRewritingExporterSucceeds(self, base_exporter_mock):
      base_exporter_mock.side_effect = _export_fn
  
      tr = self._TestRewriter(False)
      r_e = converters.RewritingExporter(self._base_exporter, tr)
      final_path = r_e.export(
          self._estimator,
          self._export_path,
          self._checkpoint_path,
          self._eval_result,
          self._is_the_final_export,
      )
      self.assertEqual(
          final_path,
          os.path.join(self._export_path, BASE_EXPORT_SUBDIR),
      )
      self.assertTrue(
          fileio.exists(os.path.join(final_path, REWRITTEN_SAVED_MODEL))
      )
      self.assertTrue(
          fileio.exists(
              os.path.join(
                  final_path,
                  tf.saved_model.ASSETS_DIRECTORY,
                  REWRITTEN_VOCAB,
              )
          )
      )
  
      base_exporter_mock.assert_called_once_with(
          self._estimator,
          self._export_path,
          self._checkpoint_path,
          self._eval_result,
          self._is_the_final_export,
      )
  
file_path: tfx/tfx/components/trainer/rewriting/converters_test.py
imports: import os
  import tempfile
  from absl.testing.absltest import mock
  import tensorflow
  from tensorflow import estimator
  from tfx.components.trainer.rewriting import converters
  from tfx.components.trainer.rewriting import rewriter
  from tfx.dsl.io import fileio
label_desc: Use image node_id 2 for calling the RewritingExporterTest obj's underlying member method code with example usage: obj.testRewritingExporterSucceeds(base_exporter_mock) without return types