def _compile_property_ast(schema, current_schema_type, ast, location,
                          context, unique_local_directives):
    """Process property directives at this AST node, updating the query context as appropriate.

    Args:
        schema: GraphQL schema object, obtained from the graphql library
        current_schema_type: GraphQLType, the schema type at the current location
        ast: GraphQL AST node, obtained from the graphql library. Only for function signature
             uniformity at the moment -- it is currently not used.
        location: Location object representing the current location in the query
        context: dict, various per-compilation data (e.g. declared tags, whether the current block
                 is optional, etc.). May be mutated in-place in this function!
        unique_local_directives: dict, directive name string -> directive object, containing
                                 unique directives present on the current AST node *only*
    """
    validate_property_directives(unique_local_directives)

    if location.field == COUNT_META_FIELD_NAME:
        # Verify that uses of this field are within a @fold scope.
        if not is_in_fold_scope(context):
            raise GraphQLCompilationError(u'Cannot use the "{}" meta field when not within a @fold '
                                          u'vertex field, as counting elements only makes sense '
                                          u'in a fold. Location: {}'
                                          .format(COUNT_META_FIELD_NAME, location))

    # step P-2: process property-only directives
    tag_directive = unique_local_directives.get('tag', None)
    if tag_directive:
        if is_in_fold_scope(context):
            raise GraphQLCompilationError(u'Tagging values within a @fold vertex field is '
                                          u'not allowed! Location: {}'.format(location))

        if location.field == COUNT_META_FIELD_NAME:
            raise AssertionError(u'Tags are prohibited within @fold, but unexpectedly found use of '
                                 u'a tag on the {} meta field that is only allowed within a @fold!'
                                 u'Location: {}'
                                 .format(COUNT_META_FIELD_NAME, location))

        # Schema validation has ensured that the fields below exist.
        tag_name = tag_directive.arguments[0].value.value
        if tag_name in context['tags']:
            raise GraphQLCompilationError(u'Cannot reuse tag name: {}'.format(tag_name))
        validate_safe_string(tag_name)
        context['tags'][tag_name] = {
            'location': location,
            'optional': is_in_optional_scope(context),
            'type': strip_non_null_from_type(current_schema_type),
        }
        context['metadata'].record_tag_info(tag_name, TagInfo(location=location))

    output_directive = unique_local_directives.get('output', None)
    if output_directive:
        # Schema validation has ensured that the fields below exist.
        output_name = output_directive.arguments[0].value.value
        if output_name in context['outputs']:
            raise GraphQLCompilationError(u'Cannot reuse output name: '
                                          u'{}, {}'.format(output_name, context))
        validate_safe_string(output_name)
        validate_output_name(output_name)

        graphql_type = strip_non_null_from_type(current_schema_type)
        if is_in_fold_scope(context):
            # Fold outputs are only allowed at the last level of traversal.
            set_fold_innermost_scope(context)

            if location.field != COUNT_META_FIELD_NAME:
                graphql_type = GraphQLList(graphql_type)

        context['outputs'][output_name] = {
            'location': location,
            'optional': is_in_optional_scope(context),
            'type': graphql_type,
            'fold': context.get('fold', None),
        }
Process property directives at this AST node, updating the query context as appropriate.

    Args:
        schema: GraphQL schema object, obtained from the graphql library
        current_schema_type: GraphQLType, the schema type at the current location
        ast: GraphQL AST node, obtained from the graphql library. Only for function signature
             uniformity at the moment -- it is currently not used.
        location: Location object representing the current location in the query
        context: dict, various per-compilation data (e.g. declared tags, whether the current block
                 is optional, etc.). May be mutated in-place in this function!
        unique_local_directives: dict, directive name string -> directive object, containing
                                 unique directives present on the current AST node *only*