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: Set an upload policy for a file unless one has already been set.
docstr_tok: ["Set","an","upload","policy","for","a","file","unless","one","has","already","been","set","."]
code: def set_default_file_policy(
      self, filename: str, file_policy: "DefaultFilePolicy"
  ) -> None:
      """Set an upload policy for a file unless one has already been set."""
      if filename not in self._file_policies:
          self._file_policies[filename] = file_policy
  
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 4 for calling the FileStreamApi obj's underlying member method code with example usage: obj.set_default_file_policy(filename, file_policy) without return types