code: def put(self, name):
      params = {}
      if request.is_json:
          params.update((request.json or {}).get("params", {}))
      else:
          params.update(request.form or {})
  
      if len(params) == 0:
          abort(400, "type of 'params' must be dict")
  
      files = request.files
      temp_dir = None
      if files is not None and len(files) > 0:
          temp_dir = tempfile.mkdtemp(prefix="integration_files_")
          for key, file in files.items():
              temp_dir_path = Path(temp_dir)
              file_name = Path(file.filename)
              file_path = temp_dir_path.joinpath(file_name).resolve()
              if temp_dir_path not in file_path.parents:
                  raise Exception(
                      f"Can not save file at path: {file_path}"
                  )
              file.save(file_path)
              params[key] = file_path
  
      is_test = params.get("test", False)
  
      config = Config()
      secret_key = config.get("secret_key", "dummy-key")
  
      if is_test:
          del params["test"]
  
          handler_type = params.pop("type", None)
          params.pop("publish", None)
          handler = ca.integration_controller.create_tmp_handler(
              handler_type=handler_type, connection_data=params
          )
  
          status = handler.check_connection()
          if temp_dir is not None:
              shutil.rmtree(temp_dir)
  
          resp = status.to_json()
          if status.success and "code" in params:
              if hasattr(handler, "handler_storage"):
                  # attach storage if exists
                  export = handler.handler_storage.export_files()
                  if export:
                      # encrypt with flask secret key
                      encrypted = encrypt(export, secret_key)
                      resp["storage"] = encrypted.decode()
  
          return resp, 200
  
      integration = ca.integration_controller.get(
          name, sensitive_info=False
      )
      if integration is not None:
          abort(400, f"Integration with name '{name}' already exists")
  
      try:
          engine = params["type"]
          if engine is not None:
              del params["type"]
          params.pop("publish", False)
          storage = params.pop("storage", None)
          ca.integration_controller.add(name, engine, params)
  
          # copy storage
          if storage is not None:
              handler = ca.integration_controller.get_handler(name)
  
              export = decrypt(storage.encode(), secret_key)
              handler.handler_storage.import_files(export)
  
      except Exception as e:
          logger.error(str(e))
          if temp_dir is not None:
              shutil.rmtree(temp_dir)
          abort(500, f"Error during config update: {str(e)}")
  
      if temp_dir is not None:
          shutil.rmtree(temp_dir)
      return {}, 200
  
imports: import os
  import copy
  import shutil
  import datetime
  import tempfile
  from pathlib import Path
  from dateutil.parser import parse
  from flask import request
  from flask_restx import Resource, abort
  from flask import current_app
  from dateutil.tz import tzlocal
  from mindsdb.utilities import log
  from mindsdb.utilities.functions import encrypt, decrypt
  from mindsdb.api.http.namespaces.configs.config import ns_conf
  from mindsdb.utilities.log_controller import get_logs
  from mindsdb.utilities.config import Config
  from mindsdb.api.http.utils import http_error
label_desc: Use image node_id 2 for calling the Integration obj's underlying member method code with example usage: obj.put(name) and returns: dict,  int, resp,  int