code: def test_ipython_notebook(self, mock_python_exporter):
      file_contents = (
          "num_train_examples = info.splits['train'].num_examples\n"
          "eval_dataset = mnist_test.map(scale).batch(BATCH_SIZE)\n"
      )
      mock_python_exporter.return_value.from_filename.return_value = (
          file_contents,
          None,
      )
      self.setup_ipython()
      script_lines = self.get_preprocessed_entry_point()
      expected_lines = [
          "import os\n",
          "import tensorflow as tf\n",
          'os.environ["TF_KERAS_RUNNING_REMOTELY"]="1"\n',
          "import faulthandler\n",
          "faulthandler.enable()\n",
          "import sys\n",
          "for flag in sys.argv[1:]:\n",
          '  if flag.startswith("TUNER_ID"):\n',
          '    os.environ["KERASTUNER_TUNER_ID"]=flag\n',
          "strategy = tf.distribute.OneDeviceStrategy(device='/gpu:0')\n",
          "tf.distribute.experimental_set_strategy(strategy)\n",
      ]
      for el in expected_lines:
          self.assertIn(el, script_lines)
      self.assertIn(
          "num_train_examples = info.splits['train'].num_examples\n",
          script_lines,
      )
      self.assertIn(
          "eval_dataset = mnist_test.map(scale).batch(BATCH_SIZE)\n",
          script_lines,
      )
  
file_path: cloud/src/python/tensorflow_cloud/core/tests/unit/preprocess_test.py
imports: import os
  from absl.testing import absltest
  import mock
  from tensorflow_cloud.core import machine_config
  from tensorflow_cloud.core import preprocess
label_desc: Use image node_id 9 for calling the TestPreprocess obj's underlying member method code with example usage: obj.test_ipython_notebook(mock_python_exporter) without return types