def METHOD_NAME(self,
                     timeout_seconds=120,
                     include_metadata: bool = False) -> Generator:
    """ Returns a generator that produces all data rows that are currently
    in this batch.
    Note: For efficiency, the data are cached for 30 minutes. Newly created data rows will not appear
    until the end of the cache period.
    Args:
        timeout_seconds (float): Max waiting time, in seconds.
        include_metadata (bool): True to return related DataRow metadata
    Returns:
        Generator that yields DataRow objects belonging to this batch.
    Raises:
        LabelboxError: if the export fails or is unable to download within the specified time.
    """
    id_param = "batchId"
    metadata_param = "includeMetadataInput"
    query_str = """mutation GetBatchDataRowsExportUrlPyApi($%s: ID!, $%s: Boolean!)
        {exportBatchDataRows(data:{batchId: $%s , includeMetadataInput: $%s}) {downloadUrl createdAt status}}
    """ % (id_param, metadata_param, id_param, metadata_param)
    sleep_time = 2
    while True:
        res = self.client.execute(query_str, {
            id_param: self.uid,
            metadata_param: include_metadata
        })
        res = res["exportBatchDataRows"]
        if res["status"] == "COMPLETE":
            download_url = res["downloadUrl"]
            response = requests.get(download_url)
            response.raise_for_status()
            reader = parser.reader(StringIO(response.text))
            return (
                Entity.DataRow(self.client, result) for result in reader)
        elif res["status"] == "FAILED":
            raise LabelboxError("Data row export failed.")
        timeout_seconds -= sleep_time
        if timeout_seconds <= 0:
            raise LabelboxError(
                f"Unable to export data rows within {timeout_seconds} seconds."
            )
        logger.debug("Batch '%s' data row export, waiting for server...",
                     self.uid)
        time.sleep(sleep_time)