code: def test_random_inputs(self):
      for _ in range(10):
          batch_size = np.random.randint(900, 1100, size=[])
          input_seqlen = np.random.randint(1, 10, size=[])
          target_seqlen = np.random.randint(1, 10, size=[])
          inputs_list = []
          targets_list = []
          for _ in range(batch_size):
              input_num_pads = np.random.randint(
                  0, input_seqlen, size=[]
              )
              input_pads = np.full([input_num_pads], 0, dtype=np.int32)
              inputs = np.random.randint(
                  1, 10, size=[input_seqlen - input_num_pads]
              )
              inputs = np.concatenate([inputs, input_pads], axis=0)
  
              target_num_pads = np.random.randint(
                  0, target_seqlen, size=[]
              )
              target_pads = np.full(
                  [target_num_pads], 0, dtype=np.int32
              )
              targets = np.random.randint(
                  1, 10, size=[target_seqlen - target_num_pads]
              )
              targets = np.concatenate([targets, target_pads], axis=0)
  
              inputs_list.append(inputs)
              targets_list.append(targets)
          input_maxlen = np.random.randint(
              input_seqlen, input_seqlen + 10, size=[]
          )
          target_maxlen = np.random.randint(
              target_seqlen, target_seqlen + 10, size=[]
          )
          (
              inputs_packed2,
              inputs_segmentation2,
              inputs_positions2,
              targets_packed2,
              targets_segmentation2,
              targets_positions2,
          ) = pack_sequences_ops.pack_sequences2(
              inputs_list, targets_list, input_maxlen, target_maxlen
          )
          (
              inputs_packed_k,
              inputs_segmentation_k,
              inputs_positions_k,
              targets_packed_k,
              targets_segmentation_k,
              targets_positions_k,
          ) = _pack_sequences_k(
              inputs_list, targets_list, input_maxlen, target_maxlen
          )
  
          self.assertAllEqual(inputs_packed2, inputs_packed_k)
          self.assertAllEqual(
              inputs_segmentation2, inputs_segmentation_k
          )
          self.assertAllEqual(inputs_positions2, inputs_positions_k)
          self.assertAllEqual(targets_packed2, targets_packed_k)
          self.assertAllEqual(
              targets_segmentation2, targets_segmentation_k
          )
          self.assertAllEqual(targets_positions2, targets_positions_k)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.data_generators.ops import pack_sequences_ops
  import tensorflow.compat.v1
label_desc: Use image node_id 9 for calling the PackSequencesOpsTest obj's underlying member method code with example usage: obj.test_random_inputs() without return types