code: def handle_user_error(error):
      response = jsonify(error.to_dict())
      response.status_code = error.status_code
      return response
  
imports: from __future__ import absolute_import, print_function, division, unicode_literals
  import os
  from flask import request, jsonify, send_from_directory, g
  from redis import Redis
  from rq import Connection
  from sqlalchemy import create_engine
  from sklearn.model_selection import ParameterGrid
  from sklearn.model_selection import ParameterSampler
  from xcessiv import app, functions, exceptions, models, rqtasks
  from xcessiv.presets import learnersetting, metricsetting, cvsetting
  import six
label_desc: Use image node_id 1 for calling a global function with example usage: handle_user_error(error) and returns: response