code: def _tokens_per_second(
      generated_text: str, max_token_length: int, latency: float
  ) -> int:
      """Placeholder docstring"""
      est_tokens = (
          _tokens_from_chars(generated_text)
          + _tokens_from_words(generated_text)
      ) / 2
      return min(est_tokens, max_token_length) / latency
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/utils/tuning.py
imports: from __future__ import absolute_import
  import logging
  from time import perf_counter
  import collections
  from multiprocessing.pool import ThreadPool
  from math import ceil
  import pandas
  from numpy import percentile, std
  from sagemaker.serve.model_server.djl_serving.utils import _tokens_from_chars, _tokens_from_words
  from sagemaker.base_predictor import PredictorBase
label_desc: Use image node_id 3 for calling a global function with example usage: _tokens_per_second(generated_text, max_token_length, latency) and returns: unknown