def from_attribute(attr):
        """
        Converts an attribute into a shadow attribute.

        :param attr: :class:`MispAttribute` instance to be converted
        :returns: Converted :class:`MispShadowAttribute`
        :example:

        >>> server = MispServer()
        >>> event = server.events.get(12)
        >>> attr = event.attributes[0]
        >>> prop = MispShadowAttribute.from_attribute(attr)

        """
        assert attr is not MispAttribute
        prop = MispShadowAttribute()
        prop.distribution = attr.distribution
        prop.type = attr.type
        prop.comment = attr.comment
        prop.value = attr.value
        prop.category = attr.category
        prop.to_ids = attr.to_ids
        return prop
def from_attribute ( attr ) : assert attr is not MispAttribute prop = MispShadowAttribute ( ) prop . distribution = attr . distribution prop . type = attr . type prop . comment = attr . comment prop . value = attr . value prop . category = attr . category prop . to_ids = attr . to_ids return prop
Converts an attribute into a shadow attribute.

        :param attr: :class:`MispAttribute` instance to be converted
        :returns: Converted :class:`MispShadowAttribute`
        :example:

        >>> server = MispServer()
        >>> event = server.events.get(12)
        >>> attr = event.attributes[0]
        >>> prop = MispShadowAttribute.from_attribute(attr)