def METHOD_NAME(parser, token):
    '''Validates that the user has access permission in top menu
        @Example: {% has_perm_menu <write> <read> %}
    '''
    parts = token.split_contents()
    if len(parts) < 3:
        raise template.TemplateSyntaxError(
            "'has_perm_menu' tag must be of the form:  {% has_perm_menu <write> <read> %}")
    return PermissionMenu(parts[1], parts[2])