def DEFINE_flag(flag, flag_values=FLAGS):
 fv = flag_values
 fv[flag.name] = flag
 if isinstance(flag_values, FlagValues):
  (module, module_name) = _GetCallingModuleObjectAndName()
  flag_values._RegisterFlagByModule(module_name, flag)
  flag_values._RegisterFlagByModuleId(id(module), flag)

def DEFINE_flag ( flag , flag_values = FLAGS ) : fv = flag_values fv [ flag . name ] = flag if isinstance ( flag_values , FlagValues ) : ( module , module_name ) = _GetCallingModuleObjectAndName ( ) flag_values . _RegisterFlagByModule ( module_name , flag ) flag_values . _RegisterFlagByModuleId ( id ( module ) , flag )
registers a flag object with a flagvalues object .