code: def test_parse_args_sets_candidate_count(self):
      parser = cmd_line_parser.CmdLineParser()
      # Test that the min and max values are accepted.
      results, _ = parser.parse_line("--candidate_count=1")
      self.assertEqual(
          model_lib.ModelArguments(candidate_count=1),
          results.model_args,
      )
      results, _ = parser.parse_line("--candidate_count=8")
      self.assertEqual(
          model_lib.ModelArguments(candidate_count=8),
          results.model_args,
      )
  
      # Test that values outside the min and max are rejected.
      with self.assertRaisesRegex(
          argument_parser.ParserError,
          (
              r'Error with value "0", got ValueError: Value should be in the'
              r" range \[1, 8\], got 0"
          ),
      ):
          parser.parse_line("--candidate_count=0")
  
      with self.assertRaisesRegex(
          argument_parser.ParserError,
          (
              r'Error with value "9", got ValueError: Value should be in the'
              r" range \[1, 8\], got 9"
          ),
      ):
          parser.parse_line("--candidate_count=9")
  
imports: from __future__ import annotations
  import sys
  from unittest import mock
  from absl.testing import absltest
  from google.generativeai.notebook import argument_parser
  from google.generativeai.notebook import cmd_line_parser
  from google.generativeai.notebook import model_registry
  from google.generativeai.notebook import parsed_args_lib
  from google.generativeai.notebook import post_process_utils
  from google.generativeai.notebook.lib import llm_function
  from google.generativeai.notebook.lib import llmfn_output_row
  from google.generativeai.notebook.lib import llmfn_outputs
  from google.generativeai.notebook.lib import model
label_desc: Use image node_id 4 for calling the CmdLineParserModelFlagsTest obj's underlying member method code with example usage: obj.test_parse_args_sets_candidate_count() without return types