code: def attributes_from_dict(document):
      
      attributes = dict()
      for attr in document:
          name = str(attr['name'])
          attributes[name] = Attribute(
              name,
              attr['value']
          )
      return attributes
docs: 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