def find_by_index(self, cls, index_name, value):
        """Required functionality."""
        table_name = cls.get_table_name()
        index_name_vals = [(index_name, value)]

        final_results = []
        for db_result in read_by_indexes(table_name, index_name_vals):
            obj = cls.from_data(db_result['value'])
            final_results.append(obj)

        return final_results
def find_by_index ( self , cls , index_name , value ) : table_name = cls . get_table_name ( ) index_name_vals = [ ( index_name , value ) ] final_results = [ ] for db_result in read_by_indexes ( table_name , index_name_vals ) : obj = cls . from_data ( db_result [ 'value' ] ) final_results . append ( obj ) return final_results
Required functionality.