def dehydrate_calculated_properties(self, bundle):
        domain = _get_domain(bundle)
        try:
            es_data = (DomainES()
                       .in_domains([domain.name])
                       .size(1)
                       .run()
                       .hits[0])
            return {
                prop_name: es_data[prop_name]
                for prop_name in es_data if prop_name[:3] == 'cp_'
            }
        except __HOLE__:
            logging.exception('Problem getting calculated properties for {}'.format(domain.name))
            return {}
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/api/domain_metadata.py/DomainMetadataResource.dehydrate_calculated_properties