code: def onBatchCreated(self, three_pc_batch: ThreePcBatch):
          
          ledger_id = three_pc_batch.ledger_id
          if ledger_id == POOL_LEDGER_ID:
              if isinstance(self.poolManager, TxnPoolManager):
                  self.get_req_handler(POOL_LEDGER_ID).onBatchCreated(three_pc_batch.state_root, three_pc_batch.pp_time)
          elif self.get_req_handler(ledger_id):
              self.get_req_handler(ledger_id).onBatchCreated(three_pc_batch.state_root, three_pc_batch.pp_time)
          else:
              logger.debug('{} did not know how to handle for ledger {}'.format(self, ledger_id))
  
          if ledger_id == POOL_LEDGER_ID:
              three_pc_batch.primaries = self.future_primaries_handler.post_batch_applied(three_pc_batch)
          elif not three_pc_batch.primaries:
              three_pc_batch.primaries = self.future_primaries_handler.get_last_primaries() or self.primaries
          self.audit_handler.post_batch_applied(three_pc_batch)
  
          self.execute_hook(NodeHooks.POST_BATCH_CREATED, ledger_id, three_pc_batch.state_root)
docs: A batch of requests has been created and has been applied but
          committed to ledger and state.
          :param ledger_id:
          :param state_root: state root after the batch creation
          :return: