parameters: (flag, flag_values=FLAGS)
docstring: Registers a 'Flag' object with a 'FlagValues' object.
  
    By default, the global FLAGS 'FlagValue' object is used.
  
    Typical users will use one of the more specialized DEFINE_xxx
    functions, such as DEFINE_string or DEFINE_integer.  But developers
    who need to create Flag objects themselves should use this function
    to register their flags.
docstring_summary: Registers a 'Flag' object with a 'FlagValues' object.
docstring_tokens: Registers a Flag object with a FlagValues object .
function: def DEFINE_flag(flag, flag_values=FLAGS):
    """Registers a 'Flag' object with a 'FlagValues' object.
  
    By default, the global FLAGS 'FlagValue' object is used.
  
    Typical users will use one of the more specialized DEFINE_xxx
    functions, such as DEFINE_string or DEFINE_integer.  But developers
    who need to create Flag objects themselves should use this function
    to register their flags.
    """
    # copying the reference to flag_values prevents pychecker warnings
    fv = flag_values
    fv[flag.name] = flag
    # Tell flag_values who's defining the flag.
    if isinstance(flag_values, FlagValues):
      # Regarding the above isinstance test: some users pass funny
      # values of flag_values (e.g., {}) in order to avoid the flag
      # registration (in the past, there used to be a flag_values ==
      # FLAGS test here) and redefine flags with the same name (e.g.,
      # debug).  To avoid breaking their code, we perform the
      # registration only if flag_values is a real FlagValues object.
      flag_values._RegisterFlagByModule(_GetCallingModule(), flag)
function_tokens: def DEFINE_flag ( flag , flag_values = FLAGS ) : # copying the reference to flag_values prevents pychecker warnings fv = flag_values fv [ flag . name ] = flag # Tell flag_values who's defining the flag. if isinstance ( flag_values , FlagValues ) : # Regarding the above isinstance test: some users pass funny # values of flag_values (e.g., {}) in order to avoid the flag # registration (in the past, there used to be a flag_values == # FLAGS test here) and redefine flags with the same name (e.g., # debug).  To avoid breaking their code, we perform the # registration only if flag_values is a real FlagValues object. flag_values . _RegisterFlagByModule ( _GetCallingModule ( ) , flag )