code: def is_consistent(self) -> bool:
          
          from ledger.compact_merkle_tree import CompactMerkleTree
          return self.nodeCount == CompactMerkleTree.get_expected_node_count(
              self.leafCount)
docs: Returns True if number of nodes are consistent with number of leaves