'Given a raw schema structure back from a DynamoDB response, parse
out & build the high-level Python objects that represent them.'

def _introspect_schema(self, raw_schema, raw_attributes=None):

    schema = []
    sane_attributes = {}
    if raw_attributes:
        for field in raw_attributes:
            sane_attributes[field['AttributeName']] = field['AttributeType']
    for field in raw_schema:
        data_type = sane_attributes.get(field['AttributeName'], STRING)
        if (field['KeyType'] == 'HASH'):
            schema.append(HashKey(field['AttributeName'], data_type=data_type))
        elif (field['KeyType'] == 'RANGE'):
            schema.append(RangeKey(field['AttributeName'], data_type=data_type))
        else:
            raise exceptions.UnknownSchemaFieldError(('%s    was    seen,    but    is    unknown.    Please    report    this    at    https://github.com/boto/boto/issues.' % field['KeyType']))
    return schema
