def _update_caches_with_chargebee_data(  # type: ignore[no-untyped-def]
    organisations: typing.Iterable[Organisation],
    organisation_info_cache_dict: OrganisationSubscriptionInformationCacheDict,
):
    """
    Mutates the provided organisation_info_cache_dict in place to add information about the organisation's
    chargebee plan.
    """
    if not settings.CHARGEBEE_API_KEY:
        return

    for organisation in organisations:
        subscription = getattr(organisation, "subscription", None)
        if (
            not subscription
            or subscription.subscription_id is None
            or subscription.payment_method != CHARGEBEE
        ):
            continue

        metadata = get_subscription_metadata_from_id(subscription.subscription_id)
        if not metadata:
            continue

        subscription_info_cache = organisation_info_cache_dict[organisation.id]
        subscription_info_cache.allowed_seats = metadata.seats
        subscription_info_cache.allowed_30d_api_calls = metadata.api_calls
        subscription_info_cache.chargebee_email = metadata.chargebee_email

    Mutates the provided organisation_info_cache_dict in place to add information about the organisation's
    chargebee plan.
    
api/organisations/subscription_info_cache.py