def qw_not_found(arg1, arg2, path=None, headers=None, payload=None):
    """This function is used when a not found resource should be returned.
    According arg2 argument, if "not_found" is detected as a string then
    payload is returned directly or as part of "data" dictionnary.
    """
    payload = {'errors': [{
                  'code': 'not_found',
                  'message': 'Resource not found'
                  }]
              }
    if arg2 == 'not_found':
        return payload
    return  {'data': payload}