code: def test_huffman_can_append(self):
      data1 = make_data()
      builder = make_code_builder(data1)
      coder = builder.build_code()
  
      with TemporaryDirectory() as dirname:
          prefix1 = os.path.join(dirname, "test1")
          build_dataset(prefix1, data1, coder)
  
          data2 = make_data()
          prefix2 = os.path.join(dirname, "test2")
          build_dataset(prefix2, data2, coder)
  
          prefix3 = os.path.join(dirname, "test3")
  
          with HuffmanMMapIndexedDatasetBuilder(
              prefix3, coder
          ) as builder:
              builder.append(prefix1)
              builder.append(prefix2)
  
          dataset = HuffmanMMapIndexedDataset(prefix3)
  
          self.assertEqual(len(dataset), len(data1) + len(data2))
  
          decoded1 = [
              list(dataset.get_symbols(i)) for i in range(0, len(data1))
          ]
          self.assertEqual(decoded1, data1)
  
          decoded2 = [
              list(dataset.get_symbols(i))
              for i in range(len(data1), len(dataset))
          ]
          self.assertEqual(decoded2, data2)
  
          data_sizes = [i.item() for i in dataset.sizes]
          self.assertEqual(data_sizes[: len(data1)], sizes(data1))
          self.assertEqual(
              data_sizes[len(data1) : len(dataset)], sizes(data2)
          )
  
imports: import os
  import typing
  import unittest
  from collections import Counter
  from tempfile import NamedTemporaryFile, TemporaryDirectory
  from fairseq.data import Dictionary, indexed_dataset
  from fairseq.data.huffman import HuffmanCodeBuilder, HuffmanCoder, HuffmanMMapIndexedDataset, HuffmanMMapIndexedDatasetBuilder
  from tests.utils import POPULATION, make_data, sizes
label_desc: Use image node_id 3 for calling the TestHuffmanDataset obj's underlying member method code with example usage: obj.test_huffman_can_append() without return types