parameters: (flag_name, default_value, docstring)
docstring: Defines a flag of type 'boolean'.
  
    Args:
      flag_name: The name of the flag as a string.
      default_value: The default value the flag should take as a boolean.
      docstring: A helpful message explaining the use of the flag.
docstring_summary: Defines a flag of type 'boolean'.
docstring_tokens: Defines a flag of type boolean .
function: def DEFINE_boolean(flag_name, default_value, docstring):
    """Defines a flag of type 'boolean'.
  
    Args:
      flag_name: The name of the flag as a string.
      default_value: The default value the flag should take as a boolean.
      docstring: A helpful message explaining the use of the flag.
    """
    # Register a custom function for 'bool' so --flag=True works.
    def str2bool(v):
      return v.lower() in ('true', 't', '1')
    _global_parser.add_argument('--' + flag_name,
                                nargs='?',
                                const=True,
                                help=docstring,
                                default=default_value,
                                type=str2bool)
  
    # Add negated version, stay consistent with argparse with regard to
    # dashes in flag names.
    _global_parser.add_argument('--no' + flag_name,
                                action='store_false',
                                dest=flag_name.replace('-', '_'))
function_tokens: def DEFINE_boolean ( flag_name , default_value , docstring ) : # Register a custom function for 'bool' so --flag=True works. def str2bool ( v ) : return v . lower ( ) in ( 'true' , 't' , '1' ) _global_parser . add_argument ( '--' + flag_name , nargs = '?' , const = True , help = docstring , default = default_value , type = str2bool ) # Add negated version, stay consistent with argparse with regard to # dashes in flag names. _global_parser . add_argument ( '--no' + flag_name , action = 'store_false' , dest = flag_name . replace ( '-' , '_' ) )