@classmethod
def from_list(cls, assoclist, assoctype, resource, sortkey=None):
    """Create AssociationsMap from assoclist."""
    if assoclist is None:
        return None
    assocs = cls(assoctype, resource, sortkey=sortkey)
    for assoc_d in assoclist:
        assoc = assocs.assoc_class.from_dict(assoc_d)
        assocs[assoc.key] = assoc.value
    return assocs
