def MarkFlagAsRequired(flag_name, flag_values=FLAGS):
 RegisterValidator(flag_name, (lambda value: (value is not None)), message=('Flag --%s must be specified.' % flag_name), flag_values=flag_values)

def MarkFlagAsRequired ( flag_name , flag_values = FLAGS ) : RegisterValidator ( flag_name , ( lambda value : ( value is not None ) ) , message = ( 'Flag --%s must be specified.' % flag_name ) , flag_values = flag_values )
ensure that flag is not none during program execution .