def parse_attribute(self, attribute, return_type=False):
    "\n        Returns the attribute value, where the attribute can be\n        a raw attribute value, or a dictionary containing the type:\n        {'S': 'String value'}\n        "
    if isinstance(attribute, dict):
        for key in SHORT_ATTR_TYPES:
            if (key in attribute):
                if return_type:
                    return (key, attribute.get(key))
                return attribute.get(key)
        raise ValueError('Invalid attribute supplied: {0}'.format(attribute))
    else:
        if return_type:
            return (None, attribute)
        return attribute
Returns the attribute value, where the attribute can be
a raw attribute value, or a dictionary containing the type:
{'S': 'String value'}
def parse_attribute(self, attribute, return_type=False):
    "\n        Returns the attribute value, where the attribute can be\n        a raw attribute value, or a dictionary containing the type:\n        {'S': 'String value'}\n        "
    if isinstance(attribute, dict):
        for key in SHORT_ATTR_TYPES:
            if (key in attribute):
                if return_type:
                    return (key, attribute.get(key))
                return attribute.get(key)
        raise ValueError('Invalid attribute supplied: {0}'.format(attribute))
    else:
        if return_type:
            return (None, attribute)
        return attribute