class_docstr: Definition for a flag that takes a single value.
  
  Sample usage:
    # This defines a flag that can be specified on the command line as:
    #   --count=10
    flag = SingleValueFlagDef(name="count", parse_type=int, required=True)
    flag.add_argument_to_parser(argument_parser)
  
  Attributes:
    default_value: Default value for optional flags.
class_docstr_tok: ["Definition","for","a","flag","that","takes","a","single","value",".","Sample","usage",":","#","This","defines","a","flag","that","can","be","specified","on","the","command","line","as",":","#","--","count=10","flag","=","SingleValueFlagDef","(","name=","''","count","''",",","parse_type=int",",","required=True",")","flag.add_argument_to_parser","(","argument_parser",")","Attributes",":","default_value",":","Default","value","for","optional","flags","."]
code: def add_argument_to_parser(
      self, parser: argparse.ArgumentParser
  ) -> None:
      args = ["--" + self.name]
      if self.short_name is not None:
          args += ["-" + self.short_name]
  
      kwargs = {}
      if self._has_default_value():
          kwargs["default"] = self.default_value
      if self.choices is not None:
          kwargs["choices"] = self.choices
      if self.help_msg is not None:
          kwargs["help"] = self.help_msg
  
      parser.add_argument(
          *args,
          action=_SingleValueStoreAction,
          type=self.parse_type,
          dest_type=self._get_dest_type(),
          parse_to_dest_type_fn=self._get_parse_to_dest_type_fn(),
          required=self.required,
          nargs=1,
          **kwargs,
      )
  
imports: from __future__ import annotations
  import abc
  import argparse
  import dataclasses
  import enum
  from typing import Any, Callable, Sequence, Tuple, Union
  from google.generativeai.notebook.lib import llmfn_inputs_source
  from google.generativeai.notebook.lib import llmfn_outputs
label_desc: Use image node_id 2 for calling the SingleValueFlagDef obj's underlying member method code with example usage: obj.add_argument_to_parser(parser) without return types