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.
code: def rate_limit_seconds(self) -> Union[int, float]:
      run_time = time.time() - self._start_time
      if run_time < 60:
          return max(1.0, self.heartbeat_seconds / 15)
      elif run_time < 300:
          return max(2.5, self.heartbeat_seconds / 3)
      else:
          return max(5.0, self.heartbeat_seconds)
  
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 7 for calling the FileStreamApi obj's underlying member method code with example usage: obj.rate_limit_seconds() and returns: max, max, max