<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def validate_vertex_field_directive_in_context(parent_location, vertex_field_name, directives, context):
 """Ensure that the specified vertex field directives are allowed in the current context."""

    fold_directive = directives.get('fold', None)
    optional_directive = directives.get('optional', None)
    recurse_directive = directives.get('recurse', None)
    output_source_directive = directives.get('output_source', None)

    fold_context = 'fold' in context
    optional_context = 'optional' in context
    output_source_context = 'output_source' in context

    if fold_directive and fold_context:
        raise GraphQLCompilationError(u'@fold is not allowed within a @fold traversal! '
                                      u'Parent location: {}, vertex field name: {}'
                                      .format(parent_location, vertex_field_name))
    if optional_directive and fold_context:
        raise GraphQLCompilationError(u'@optional is not allowed within a @fold traversal! '
                                      u'Parent location: {}, vertex field name: {}'
                                      .format(parent_location, vertex_field_name))
    if output_source_directive and fold_context:
        raise GraphQLCompilationError(u'@output_source is not allowed within a @fold traversal! '
                                      u'Parent location: {}, vertex field name: {}'
                                      .format(parent_location, vertex_field_name))
    if recurse_directive and fold_context:
        raise GraphQLCompilationError(u'@recurse is not allowed within a @fold traversal! '
                                      u'Parent location: {}, vertex field name: {}'
                                      .format(parent_location, vertex_field_name))

    if output_source_context and not fold_directive:
        raise GraphQLCompilationError(u'Found non-fold vertex field after the vertex marked '
                                      u'output source! Parent location: {}, vertex field name: {}'
                                      .format(parent_location, vertex_field_name))
    if optional_context and fold_directive:
        raise GraphQLCompilationError(u'@fold is not allowed within a @optional traversal! '
                                      u'Parent location: {}, vertex field name: {}'
                                      .format(parent_location, vertex_field_name))
    if optional_context and output_source_directive:
        raise GraphQLCompilationError(u'@output_source is not allowed within a @optional '
                                      u'traversal! Parent location: {}, vertex field name: {}'
                                      .format(parent_location, vertex_field_name))