def resolve_realms(self, attributes):
realms = []<EOL>for realm, realm_attributes in attributes['<STR_LIT>'].items():<EOL><INDENT>realm_cls = maybe_resolve(realm)<EOL>account_store_cls = maybe_resolve(realm_attributes['<STR_LIT>'])<EOL>verifiers = {}<EOL>authc_verifiers = realm_attributes.get('<STR_LIT>')<EOL>if authc_verifiers:<EOL><INDENT>if isinstance(authc_verifiers, list):<EOL><INDENT>authc_verifiers_cls = tuple(maybe_resolve(verifier)(self.settings) for<EOL>verifier in authc_verifiers)<EOL><DEDENT>else:<EOL><INDENT>authc_verifiers_cls = tuple([maybe_resolve(authc_verifiers)(self.settings)])<EOL><DEDENT>verifiers['<STR_LIT>'] = authc_verifiers_cls<EOL><DEDENT>authz_verifier = realm_attributes.get('<STR_LIT>')<EOL>if authz_verifier:<EOL><INDENT>permission_verifier_cls = maybe_resolve(authz_verifier)<EOL>if permission_verifier_cls:<EOL><INDENT>verifiers['<STR_LIT>'] = maybe_resolve(permission_verifier_cls)()<EOL><DEDENT><DEDENT>realms.append([realm_cls, account_store_cls, verifiers])<EOL><DEDENT>return realms<EOL>
The format of realm settings is:
    {'name_of_realm':
        {'cls': 'location to realm class',
         'account_store': 'location to realm account_store class'}}

    - 'name of realm' is a label used for internal tracking
    - 'cls' and 'account_store' are static key names and are not to be changed
    - the location of classes should follow dotted notation: pkg.module.class