<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dump_json_body(handler):
 """ Automatically serialize response bodies with json.dumps. Returns a 500 error if the response cannot be serialized Usage:: {'statusCode': 200, 'body': '{"hello": "world"}'} """

    @wraps(handler)
    def wrapper(event, context):
        response = handler(event, context)
        if 'body' in response:
            try:
                response['body'] = json.dumps(response['body'])
            except Exception as exception:
                return {'statusCode': 500, 'body': str(exception)}
        return response
    return wrapper