def _qs2kv(qs):
    """Flatten parse_qs()'s single-item lists into the item itself"""
    return {k: v[0] if isinstance(v, list) and len(v) == 1 else v
        for k, v in qs.items()}
Flatten parse_qs()'s single-item lists into the item itself
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/msal/oauth2cli/authcode.py