code: def process_block(cls, bigchain, new_height, txns):
          
          # elections initiated in this block
          initiated_elections = cls._get_initiated_elections(new_height, txns)
  
          if initiated_elections:
              bigchain.store_elections(initiated_elections)
  
          # elections voted for in this block and their votes
          elections = cls._get_votes(txns)
  
          validator_update = None
          for election_id, votes in elections.items():
              election = bigchain.get_transaction(election_id)
              if election is None:
                  continue
  
              if not election.has_concluded(bigchain, votes):
                  continue
  
              validator_update = election.on_approval(bigchain, new_height)
              election.store(bigchain, new_height, is_concluded=True)
  
          return [validator_update] if validator_update else []
docs: Looks for election and vote transactions inside the block, records
             and processes elections.
  
             Every election is recorded in the database.
  
             Every vote has a chance to conclude the corresponding election. When
             an election is concluded, the corresponding database record is
             marked as such.
  
             Elections and votes are processed in the order in which they
             appear in the block. Elections are concluded in the order of
             appearance of their first votes in the block.
  
             For every election concluded in the block, calls its `on_approval`
             method. The returned value of the last `on_approval`, if any,
             is a validator set update to be applied in one of the following blocks.
  
             `on_approval` methods are implemented by elections of particular type.
             The method may contain side effects but should be idempotent. To account
             for other concluded elections, if it requires so, the method should
             rely on the database state.