code: def check(self):
          
          self._check_tx_inout_count()
          self._check_txs_out()
          self._check_txs_in()
          # Size limits
          self._check_size_limit()
docs: Basic checks that don't depend on any context.
          Adapted from Bicoin Code: main.cpp