code: def attribute():
      # force=True needed for Colab notebooks, which doesn't use the correct
      # Content-Type header when forwarding requests through the Colab proxy
      r = request.get_json(force=True)
      return jsonify(
          namedtuple_to_dict(
              visualizer._calculate_attribution_from_cache(
                  r["inputIndex"], r["modelIndex"], r["labelIndex"]
              )
          )
      )
  
file_path: captum/captum/insights/attr_vis/server.py
imports: import logging
  import os
  import socket
  import threading
  from time import sleep
  from typing import Optional
  from captum.log import log_usage
  from flask import Flask, jsonify, render_template, request
  from flask_compress import Compress
  from torch import Tensor
label_desc: Use image node_id 2 for calling a global function with example usage: attribute() and returns: jsonify