code: def resp_json(data, code, headers=None):
      resp = make_response(json.dumps(data, cls=NumpyEncoder), code)
      resp.headers.extend(headers or {})
      return resp
  
file_path: FARM/farm/inference_rest_api.py
imports: import json
  import logging
  from pathlib import Path
  import numpy
  from flask import Flask, request, make_response
  from flask_cors import CORS
  from flask_restplus import Api, Resource
  from farm.infer import Inferencer
label_desc: Use image node_id 1 for calling a global function with example usage: resp_json(data, code, headers) and returns: resp