def ignore_not_sysadmin(key, data, errors, context):
 user = context.get('user')
 ignore_auth = context.get('ignore_auth')
 if (ignore_auth or (user and authz.is_sysadmin(user))):
  return
 data.pop(key)

def ignore_not_sysadmin ( key , data , errors , context ) : user = context . get ( 'user' ) ignore_auth = context . get ( 'ignore_auth' ) if ( ignore_auth or ( user and authz . is_sysadmin ( user ) ) ) : return data . pop ( key )
ignore the field if user not sysadmin or ignore_auth in context .