docs: def read_in_chunks(file_obj, chunk_size):
      """Generator to read a file piece by piece."""
      offset = 0
      while True:
          data = file_obj.read(chunk_size)
          if not data:
              break
          yield data, offset
          offset += len(data)