code: def get_authzd_permissions(self, identifier, perm_domain):
          
          related_perms = []
          keys = ['*', perm_domain]
  
          def query_permissions(self):
              msg = ("Could not obtain cached permissions for [{0}].  "
                     "Will try to acquire permissions from account store."
                     .format(identifier))
              logger.debug(msg)
  
              # permissions is a dict:  {'domain': json blob of lists of dicts}
              permissions = self.account_store.get_authz_permissions(identifier)
              if not permissions:
                  msg = "Could not get permissions from account_store for {0}".\
                      format(identifier)
                  raise ValueError(msg)
              return permissions
  
          try:
              msg2 = ("Attempting to get cached authz_info for [{0}]"
                      .format(identifier))
              logger.debug(msg2)
  
              domain = 'authorization:permissions:' + self.name
  
              # related_perms is a list of json blobs whose contents are ordered
              # such that the order matches that in the keys parameter:
              related_perms = self.cache_handler.\
                  hmget_or_create(domain=domain,
                                  identifier=identifier,
                                  keys=keys,
                                  creator_func=query_permissions,
                                  creator=self)
          except ValueError:
              msg3 = ("No permissions found for identifiers [{0}].  "
                      "Returning None.".format(identifier))
              logger.warning(msg3)
  
          except AttributeError:
              # this means the cache_handler isn't configured
              queried_permissions = query_permissions(self)
  
              related_perms = [queried_permissions.get('*'),
                               queried_permissions.get(perm_domain)]
  
          return related_perms
docs: :type identifier:  str
          :type domain:  str
  
          :returns: a list of relevant json blobs, each a list of permission dicts