<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rpc_get_consensus_hashes( self, block_id_list, **con_info ):
 """ Return the consensus hashes at multiple block numbers Return a dict mapping each block ID to its consensus hash. Returns {'status': True, 'consensus_hashes': dict} on success """

        if type(block_id_list) != list:
            return {'error': 'Invalid block heights', 'http_status': 400}

        if len(block_id_list) > 32:
            return {'error': 'Too many block heights', 'http_status': 400}

        for bid in block_id_list:
            if not check_block(bid):
                return {'error': 'Invalid block height', 'http_status': 400}

        db = get_db_state(self.working_dir)
        ret = {}
        for block_id in block_id_list:
            ret[block_id] = db.get_consensus_at(block_id)

        db.close()

        return self.success_response( {'consensus_hashes': ret} )