async def get_data_processing_access(conn, client_key):
    data_processing_access = consent_helper.make_data_processing_access_list_address_by_destination_client(client_key)
    LOGGER.debug('data_processing_access: ' + str(data_processing_access))
    data_processing_access_resources = await messaging.get_state_by_address(conn, data_processing_access)
    LOGGER.debug('data_processing_access_resources: ' + str(data_processing_access_resources))
    data_processing_access_list = {}
    for entity in data_processing_access_resources.entries:
        aoa = ActionOnAccess()
        aoa.ParseFromString(entity.data)
        data_processing_access_list[entity.address] = aoa
        LOGGER.debug('data processing access: ' + str(aoa))
    return data_processing_access_list
async def get_shared_ehrs(conn, investigator_pkey):
    investigator_access_address = \
        consent_helper.make_investigator_access_list_address_by_destination_client(investigator_pkey)
    LOGGER.debug('investigator_access_address: ' + str(investigator_access_address))
    investigator_access_resources = await messaging.get_state_by_address(conn, investigator_access_address)
    LOGGER.debug('investigator_access_resources: ' + str(investigator_access_resources))
    ehrs_list = {}
    for entity in investigator_access_resources.entries:
        aoa = ActionOnAccess()
        aoa.ParseFromString(entity.data)
        ehrs = await get_ehrs(conn, aoa.src_pkey)
        ehrs_list.update(ehrs)
        LOGGER.debug('ehrs: ' + str(ehrs))
    return ehrs_list
async def get_signed_inform_consent(conn, client_key):
    signed_inform_consent_list_address = \
        consent_helper.make_sign_inform_document_consent_list_address_by_destination_client(client_key)
    LOGGER.debug('signed_inform_consent_list_address: ' + str(signed_inform_consent_list_address))
    signed_inform_consent_list_resources = \
        await messaging.get_state_by_address(conn, signed_inform_consent_list_address)
    LOGGER.debug('signed_inform_consent_list_resources: ' + str(signed_inform_consent_list_resources))
    signed_inform_consent_list = {}
    for entity in signed_inform_consent_list_resources.entries:
        aoa = ActionOnAccess()
        aoa.ParseFromString(entity.data)
        signed_inform_consent_list[entity.address] = aoa
        LOGGER.debug('signed inform consent: ' + str(aoa))
    return signed_inform_consent_list