class_docstr: RequestsMonitor holds statistics of Adapter requests.
code: def __str__(self):
      def value_mapper(v):
          tv = v["times"]
          times_format = "min:%5.2fs, median:%5.2fs, max:%5.2fs, mean:%5.2fs, total:%5.2fs"
          if tv:
              # min/max require a non-empty sequence.
              times = times_format % (
                  min(tv),
                  median(tv),
                  max(tv),
                  mean(tv),
                  sum(tv),
              )
          else:
              nan = float("nan")
              times = times_format % (nan, nan, nan, nan, 0)
  
          count = "count:%3d" % v["count"]
          retries = "retries:%3d" % v["retries"] if v["retries"] else ""
          return "; ".join(s for s in (count, times, retries) if s)
  
      legend = (
          "count – number of requests (excluding retries); "
          "min, median, max, mean, total – request duration statistics "
          "(excluding failed requests); retries – number of retries."
      )
      return pretty_dict_format(
          "Request statistics per hostname",
          self.host_stats,
          legend=legend,
          value_mapper=value_mapper,
      )
  
imports: import asyncio
  import atexit
  import contextlib
  import importlib
  import os
  import types
  from collections import defaultdict
  from functools import partial
  from statistics import mean, median
  from time import sleep
  from timeit import default_timer
  from unittest.mock import patch
  from urllib.parse import urlparse
  import pytest
  import geopy.geocoders
  from geopy.adapters import AdapterHTTPError, BaseAsyncAdapter, BaseSyncAdapter
  from geopy.geocoders.base import _DEFAULT_ADAPTER_CLASS
label_desc: Use image node_id 5 for calling the RequestsMonitor obj's underlying member method code with example usage: obj.__str__() and returns: pretty_dict_format, str