'Loads attributes from a dictionary'

def from_attrs(self, attrs):

    for (attr, value) in iteritems(attrs):
        if (attr in self._valid_attrs):
            attribute = self._valid_attrs[attr]
            if ((attribute.isa == 'class') and isinstance(value, dict)):
                obj = attribute.class_type()
                obj.deserialize(value)
                setattr(self, attr, obj)
            else:
                setattr(self, attr, value)
