<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def json_schema_validator(request_schema=None, response_schema=None):
 """ Validate your request & response payloads against a JSONSchema. *NOTE: depends on the* `jsonschema <https://github.com/Julian/jsonschema>`_ *package. If you're using* `serverless-python-requirements <https://github.com/UnitedIncome/serverless-python-requirements>`_ *you're all set. If you cURLed* ``lambda_decorators.py`` *you'll have to install it manually in your service's root directory.* Usage:: {'statusCode': 400, 'body': "RequestValidationError: 'bar' is not of type 'number'"} {'statusCode': 500, 'body': "ResponseValidationError: 'bar' is not of type 'number'"} """

    def wrapper_wrapper(handler):
        @wraps(handler)
        def wrapper(event, context):
            if request_schema is not None:
                if jsonschema is None:
                    logger.error('jsonschema is not installed, skipping request validation')
                else:
                    try:
                        jsonschema.validate(event, request_schema)
                    except jsonschema.ValidationError as exception:
                        return {'statusCode': 400,
                                'body': 'RequestValidationError: {}'.format(
                                    exception.message)}
            response = handler(event, context)
            if response_schema is not None:
                if jsonschema is None:
                    logger.error('jsonschema is not installed, skipping response validation')
                else:
                    try:
                        jsonschema.validate(response, response_schema)
                    except jsonschema.ValidationError as exception:
                        return {'statusCode': 500,
                                'body': 'ResponseValidationError: {}'.format(
                                    exception.message)}
            return response

        return wrapper

    return wrapper_wrapper