code: def register():
      try:
          params = request.json
          host = params.get("host")
          port = params.get("port")
          _type = params.get("type")
          Cache[(host, port)] = _type
          return "OK", 200
      except Exception as e:
          return str(e), 500
  
imports: import os
  import cachetools
  from flask import Flask, request
label_desc: Use image node_id 2 for calling a global function with example usage: register() and returns: str,  int, str,  int