<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def efetch(database, ids=False, webenv=False, query_key=False, count=False, retstart=False, retmax=False, rettype='full', retmode='xml', api_key=False, email=False, **kwargs) -> str: """Get documents using the Entrez ESearch API.gg Parameters database : str Entez database to search. ids : list or str List of IDs to submit to the server. webenv : str An Entrez WebEnv to use saved history. query_key : str An Entrez query_key to use saved history. count : int Number of records in the webenv retstart : int Return values starting at this index. retmax : int Return at most this number of values. rettype : str The type of document to return. Refer to link for valid return types for each database. https://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.T._valid_values_of__retmode_and/?report=objectonly retmode : str The format of document to return. Refer to link for valid formats for each database. https://www.ncbi.nlm.nih.gov/books/NBK25499/table/chapter4.T._valid_values_of__retmode_and/?report=objectonly api_key : str A users API key which allows more requests per second email : str A users email which is required if not using API. Yields ------ str Text from effect results. Format depends on parameters passed to retmode """

    url = BASE_URL + f'efetch.fcgi?db={database}&retmode={retmode}&rettype={rettype}'
    url = check_webenv(webenv, url)
    url = check_query_key(query_key, url)
    url = check_api_key(api_key, url)
    url = check_email(email, url)

    if ids:
        if isinstance(ids, str):
            id = ids
        else:
            id = ','.join(ids)
        url += f'&id={id}'
        count = len(id.split(','))

    for resp in entrez_sets_of_results(url, retstart, retmax, count):
        yield resp.text