

def batch_get_item(self):
    table_batches = self.body['RequestItems']
    results = {
        'Responses': {
            'UnprocessedKeys': {
                
            },
        },
    }
    for (table_name, table_request) in table_batches.items():
        items = []
        keys = table_request['Keys']
        attributes_to_get = table_request.get('AttributesToGet')
        for key in keys:
            hash_key = key['HashKeyElement']
            range_key = key.get('RangeKeyElement')
            item = dynamodb_backend.get_item(table_name, hash_key, range_key)
            if item:
                item_describe = item.describe_attrs(attributes_to_get)
                items.append(item_describe)
        results['Responses'][table_name] = {
            'Items': items,
            'ConsumedCapacityUnits': 1,
        }
    return dynamo_json_dump(results)

dataset/ETHPy150Open spulec/moto/moto/dynamodb/responses.py DynamoHandler.batch_get_item/original