async def METHOD_NAME(request: web.BaseRequest):
    """Request handler for getting setting associated with profile.
    Args:
        request: aiohttp request object
    """
    context: AdminRequestContext = request["context"]
    root_profile = context.root_profile or context.profile
    try:
        async with root_profile.session() as session:
            multitenant_mgr = session.inject_or(BaseMultitenantManager)
            if multitenant_mgr:
                wallet_id = context.metadata.get("wallet_id")
                wallet_key = context.metadata.get("wallet_key")
                wallet_record, profile = await multitenant_mgr.get_wallet_and_profile(
                    root_profile.context, wallet_id, wallet_key
                )
                settings_dict = _get_multitenant_settings_dict(
                    profile_settings=profile.settings.to_dict(),
                    wallet_settings=wallet_record.settings,
                )
            else:
                settings_dict = _get_settings_dict(profile=root_profile)
    except BaseError as err:
        raise web.HTTPBadRequest(reason=err.roll_up) from err
    return web.json_response(settings_dict)