<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def context_export(zap_helper, name, file_path):
 """Export a given context to a file."""

    with zap_error_handler():
        result = zap_helper.zap.context.export_context(name, file_path)

        if result != 'OK':
            raise ZAPError('Exporting context to file failed: {}'.format(result))

    console.info('Exported context {0} to {1}'.format(name, file_path))