class_docstr: tokenizer op test
docstr: test label to token id
docstr_tok: ["test","label","to","token","id"]
code: def test_text_to_tokenid_with_vocab_file(self):
      """test label to token id"""
      with self.cached_session(use_gpu=False, force_gpu=False) as sess:
          # test batch
          start = time.time()
          batch_op = py_x_ops.sentence_to_ids(
              ["hello world", "你好 hello unknown  world"],
              maxlen=10,
              use_vocab_file=True,
              vocab_filepath=self.vocab_filepath,
              load_token_ids_from_vocab=False,
              pad_id=-1,
          )
          token_ids, paddings = sess.run(batch_op)
          elapsed = time.time() - start
          logging.info("Time cost: {:.4f}s".format(elapsed))
          logging.info(token_ids)
          logging.info(paddings)
          logging.info("batch_op: {}".format(batch_op))
          self.assertAllEqual(
              token_ids,
              [
                  [2, 4, -1, -1, -1, -1, -1, -1, -1, -1],
                  [3, 2, 1, 4, -1, -1, -1, -1, -1, -1],
              ],
          )
          self.assertAllEqual(
              paddings,
              [
                  [0, 0, 1, 1, 1, 1, 1, 1, 1, 1],
                  [0, 0, 0, 0, 1, 1, 1, 1, 1, 1],
              ],
          )
  
          # test single
          single_op = py_x_ops.sentence_to_ids(
              "你好 hello unknown  world",
              maxlen=10,
              vocab_filepath=self.vocab_filepath,
              use_vocab_file=True,
              load_token_ids_from_vocab=False,
              pad_id=-1,
          )
          token_ids, paddings = sess.run(single_op)
          logging.info("single_op: {}".format(single_op))
          self.assertAllEqual(
              token_ids, [3, 2, 1, 4, -1, -1, -1, -1, -1, -1]
          )
  
          # test short single
          short_single_op = py_x_ops.sentence_to_ids(
              "你好 hello unknown  world",
              maxlen=2,
              use_vocab_file=True,
              vocab_filepath=self.vocab_filepath,
              load_token_ids_from_vocab=False,
              pad_id=0,
          )
          token_ids, paddings = sess.run(short_single_op)
          logging.info("short_op: {}".format(short_single_op))
          self.assertAllEqual(token_ids, [3, 2])
  
          # test short batch
          short_batch_op = py_x_ops.sentence_to_ids(
              ["hello world", "你好 hello unknown  world"],
              maxlen=2,
              use_vocab_file=True,
              vocab_filepath=self.vocab_filepath,
              load_token_ids_from_vocab=False,
              pad_id=0,
          )
          token_ids, paddings = sess.run(short_batch_op)
          logging.info("short_op: {}".format(short_batch_op))
          self.assertAllEqual(token_ids, [[2, 4], [3, 2]])
  
file_path: delta/core/ops/kernels/tokenizer_ops_test.py
imports: import time
  import tempfile
  import delta.compat
  from absl import logging
  from delta.layers.ops import py_x_ops
label_desc: Use image node_id 2 for calling the TokenizerOpsTest obj's underlying member method code with example usage: obj.test_text_to_tokenid_with_vocab_file() without return types