code: def calculate_fps(start_time, snd_cnt):
      end_time = time.time()
      if args.client_batching:
          fps = 1.0 * args.batch_size / (end_time - start_time)
      else:
          fps = 1.0 / (end_time - start_time)
  
      print(
          "With Batch Size {}, FPS at frame number {} is {:.1f}".format(
              args.batch_size, snd_cnt, fps
          )
      )
      return fps
  
file_path: serve/examples/image_classifier/near_real_time_video/request.py
imports: import argparse
  import base64
  import json
  import time
  from collections import deque
  from concurrent.futures import as_completed
  from threading import Thread
  import cv2
  import requests
  from requests_futures.sessions import FuturesSession
label_desc: Use image node_id 3 for calling a global function with example usage: calculate_fps(start_time, snd_cnt) and returns: fps