code: def _chunk_report_(bytes_so_far, total_size, initial_size, t0):
      """Show downloading percentage.
  
      Parameters
      ----------
      bytes_so_far : int
          Number of downloaded bytes.
  
      total_size : int
          Total size of the file (may be 0/None, depending on download method).
  
      t0 : int
          The time in seconds (as returned by time.time()) at which the
          download was resumed / started.
  
      initial_size : int
          If resuming, indicate the initial size of the file.
          If not resuming, set to zero.
  
      """
      if not total_size:
          sys.stderr.write(
              f"\rDownloaded {int(bytes_so_far)} of ? bytes."
          )
  
      else:
          # Estimate remaining download time
          total_percent = float(bytes_so_far) / total_size
  
          current_download_size = bytes_so_far - initial_size
          bytes_remaining = total_size - bytes_so_far
          dt = time.time() - t0
          download_rate = current_download_size / max(1e-8, float(dt))
          # Minimum rate of 0.01 bytes/s, to avoid dividing by zero.
          time_remaining = bytes_remaining / max(0.01, download_rate)
  
          # Trailing whitespace is to erase extra char when message length
          # varies
          sys.stderr.write(
              "\rDownloaded %d of %d bytes (%.1f%%, %s remaining)"
              % (
                  bytes_so_far,
                  total_size,
                  total_percent * 100,
                  _format_time(time_remaining),
              )
          )
  
imports: import collections.abc
  import contextlib
  import fnmatch
  import hashlib
  import os
  import pickle
  import shutil
  import sys
  import tarfile
  import time
  import urllib
  import warnings
  import zipfile
  from pathlib import Path
  import numpy
  import requests
  from .._utils import fill_doc
  from .utils import get_data_dirs
label_desc: Use image node_id 6 for calling a global function with example usage: _chunk_report_(bytes_so_far, total_size, initial_size, t0) without return types