class_docstr: Pushes chunks of files to our streaming endpoint.
  
  This class is used as a singleton. It has a thread that serializes access to
  the streaming endpoint and performs rate-limiting and batching.
  
  TODO: Differentiate between binary/text encoding.
docstr: Log dropped chunks and updates dynamic settings.
docstr_tok: ["Log","dropped","chunks","and","updates","dynamic","settings","."]
code: def _handle_response(
      self, response: Union[Exception, "requests.Response"]
  ) -> None:
      """Log dropped chunks and updates dynamic settings."""
      if isinstance(response, Exception):
          wandb.termerror(
              "Dropped streaming file chunk (see wandb/debug-internal.log)"
          )
          logger.exception("dropped chunk %s" % response)
          self._dropped_chunks += 1
      else:
          parsed: Optional[dict] = None
          try:
              parsed = response.json()
          except Exception:
              pass
          if isinstance(parsed, dict):
              limits = parsed.get("limits")
              if isinstance(limits, dict):
                  self._api.dynamic_settings.update(limits)
  
imports: import base64
  import functools
  import itertools
  import logging
  import os
  import queue
  import random
  import sys
  import threading
  import time
  from types import TracebackType
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, NamedTuple, Optional, Set, Tuple, Type, Union
  import requests
  import wandb
  from wandb import util
  from wandb.sdk.internal import internal_api
  from ..lib import file_stream_utils
label_desc: Use image node_id 11 for calling the FileStreamApi obj's underlying member method code with example usage: obj._handle_response(response) without return types