code: def read_in_chunks(dst, src, src_sz, max_chunk_size):
      remaining = src_sz
      while remaining > 0:
          buf = src.read(min(remaining, max_chunk_size))
          # Py2 doesn't return the number of bytes written so calculate size
          # separately
          dst.write(buf)
          remaining -= len(buf)
  
file_path: metaflow/metaflow/plugins/datatools/s3/s3util.py
imports: from __future__ import print_function
  from datetime import datetime
  import random
  import time
  import sys
  import os
  from metaflow.exception import MetaflowException
  from metaflow.metaflow_config import DATATOOLS_CLIENT_PARAMS, DATATOOLS_SESSION_VARS, S3_RETRY_COUNT, RETRY_WARNING_THRESHOLD
label_desc: Use image node_id 3 for calling a global function with example usage: read_in_chunks(dst, src, src_sz, max_chunk_size) without return types