async def METHOD_NAME(
    gql_session: AsyncClientSession,
    flux_info: CafInfoFlux,
    foyer: CafMsaInfosFoyer,
    caf_beneficiary: CafBeneficiary,
) -> BeneficiaryRsaInfos | None:
    beneficiary = await get_beneficiary_by_nir(gql_session, caf_beneficiary.nir)
    if beneficiary:
        beneficiary_update = transform_cafMsaFoyer_to_beneficiary(
            caf_beneficiary, foyer
        )
        external_data_to_save = {
            "flux": flux_info.dict(),
            "foyer": foyer.dict(),
        }
        sha = hashlib.sha256(str(external_data_to_save).encode()).hexdigest()
        return await update_beneficiary(
            gql_session,
            beneficiary.id,
            beneficiary_update,
            sha,
            external_data_to_save,
        )
    else:
        logging.warning("truc", caf_beneficiary.nir)