code: def test_result_type(self):
      # Cannot construct the row if the result cell is of the wrong type.
      with self.assertRaisesRegex(
          ValueError,
          'Value of last entry must be of type "int", got "str"',
      ):
          LLMFnOutputRow(
              data={"one": "first", "two": "second", "three": "third"},
              result_type=int,
          )
  
      row = LLMFnOutputRow(
          data={"one": "first", "two": "second", "three": 3},
          result_type=int,
      )
      # Cannot set the result value to the wrong type.
      with self.assertRaisesRegex(
          ValueError,
          'Value of last entry must be of type "int", got "str"',
      ):
          row.set_result_value("third")
  
      # Can set the result value if it's the correct type.
      row.set_result_value(42)
      self.assertEqual(42, row.result_value())
  
file_path: generative-ai-python/tests/notebook/lib/test_llmfn_output_row.py
imports: from __future__ import annotations
  from typing import Any, Mapping
  from absl.testing import absltest
  from google.generativeai.notebook.lib import llmfn_output_row
label_desc: Use image node_id 11 for calling the LLMFnOutputRowTest obj's underlying member method code with example usage: obj.test_result_type() without return types