async def METHOD_NAME(self):
    """Closes the batch queue by flushing pending requests."""
    if not self._is_closed:
        # debug print amount of requests to be processed.
        self._flush_trigger.set()
        if self._flush_task:
            await self._flush_task
        self._cancel_timer_if_pending()
        self._is_closed = True