<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def entrez_batch_webhistory(record, expected, batchsize, *fnargs, **fnkwargs):
 """Recovers the Entrez data from a prior NCBI webhistory search, in batches of defined size, using Efetch. Returns all results as a list. - record: Entrez webhistory record - expected: number of expected search returns - batchsize: how many search returns to retrieve in a batch - *fnargs: arguments to Efetch - **fnkwargs: keyword arguments to Efetch """

    results = []
    for start in range(0, expected, batchsize):
        batch_handle = entrez_retry(
            Entrez.efetch,
            retstart=start,
            retmax=batchsize,
            webenv=record["WebEnv"],
            query_key=record["QueryKey"],
            *fnargs,
            **fnkwargs)
        batch_record = Entrez.read(batch_handle, validate=False)
        results.extend(batch_record)
    return results