def is_required(action):
    '''
    _actions possessing the `required` flag and not implicitly optional
    through `nargs` being '*' or '?'
    '''
    return not isinstance(action, _SubParsersAction) and (
    action.required == True and action.nargs not in ['*', '?'])
def is_required ( action ) : return not isinstance ( action , _SubParsersAction ) and ( action . required == True and action . nargs not in [ '*' , '?' ] )
_actions possessing the `required` flag and not implicitly optional
    through `nargs` being '*' or '?'