def _iterate_response_content(iterator):
    """To avoid the following error from Python:
    > TypeError: StopIteration interacts badly with generators and cannot be raised into a Future

    :param iterator: An iterator
    :type iterator: iterator
    :return: The next item in the iterator
    :rtype: any
    """
    try:
        return next(iterator)
    except StopIteration:
        raise _ResponseStopIteration()  # pylint: disable=raise-missing-from
To avoid the following error from Python:
    > TypeError: StopIteration interacts badly with generators and cannot be raised into a Future

    :param iterator: An iterator
    :type iterator: iterator
    :return: The next item in the iterator
    :rtype: any
    
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/pipeline/transport/_base_async.py