code: def test_batch_packing(self):
      output_ragged, mask, pos_ids = batch_packing(
          tf.ragged.constant(
              [
                  [1, 2],
                  [3],
                  [11],
                  [14],
                  [4, 5, 6, 7],
                  [101, 102, 103, 104, 105, 106, 107, 108, 109],
              ]
          )
      )
  
      assert tf.reduce_all(
          tf.equal(
              output_ragged,
              tf.ragged.constant(
                  [
                      [1, 2, 3, 11, 14, 4, 5, 6, 7],
                      [101, 102, 103, 104, 105, 106, 107, 108, 109],
                  ]
              ),
          )
      )
      assert mask.shape == (2, 9, 9)
      assert tf.reduce_all(
          mask
          == tf.constant(
              [
                  [
                      [1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                      [1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                      [0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                      [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0],
                      [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0],
                      [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0],
                      [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0],
                      [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0],
                      [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0],
                  ],
                  [
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                      [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],
                  ],
              ]
          )
      )
      assert tf.reduce_all(
          pos_ids.to_tensor()
          == tf.constant(
              [
                  [0, 1, 0, 0, 0, 0, 1, 2, 3],
                  [0, 1, 2, 3, 4, 5, 6, 7, 8],
              ],
              dtype=tf.int64,
          )
      )
  
imports: import os
  import unittest
  from finetune import SequenceLabeler
  from finetune.base_models import TableRoBERTa
  from finetune.base_models.bert.table_utils import batch_packing, get_gather_indices, slice_by_table_indices, gather_col_vals, scatter_feats, get_summary_values, chunk_ragged_tensor
  import tensorflow
label_desc: Use image node_id 1 for calling the TestTableUtils obj's underlying member method code with example usage: obj.test_batch_packing() without return types