Convert a Json representation of a set of attribute instances into a
    dictionary.

    Parameters
    ----------
    document : Json object
        Json serialization of attribute instances

    Returns
    -------
    dict(Attribute)
        Dictionary of attribute instance objects keyed by their name

def attributes_from_dict(document):
    """Convert a Json representation of a set of attribute instances into a
    dictionary.

    Parameters
    ----------
    document : Json object
        Json serialization of attribute instances

    Returns
    -------
    dict(Attribute)
        Dictionary of attribute instance objects keyed by their name
    """
    attributes = dict()
    for attr in document:
        name = str(attr['name'])
        attributes[name] = Attribute(
            name,
            attr['value']
        )
    return attributes