code: def read_chunks(filepath, chunk_size):
      
      try:
          with open(filepath, 'rb') as f:
              while True:
                  chunk = f.read(chunk_size)
                  if chunk:
                      yield chunk
                  else:
                      break  # EOF
      except OSError as e:
          raise error.ReadError(e.errno, filepath)
docs: Generator that yields chunks from file