docstr: compute document length
docstr_tok: ["compute","document","length"]
code: def test_compute_doc_lens(self):
      """compute document length"""
      docs = tf.placeholder(dtype=tf.int32)
      lens = compute_doc_lens(docs)
  
      with self.cached_session(use_gpu=False, force_gpu=False) as sess:
          # test for 1d
          res = sess.run(lens, feed_dict={docs: [1, 2, 0, 0]})
          self.assertEqual(res, 2)
  
          # test for 2d
          res = sess.run(
              lens, feed_dict={docs: [[1, 2, 0, 0], [1, 2, 3, 4]]}
          )
          self.assertAllEqual(res, [2, 4])
  
file_path: delta/delta/layers/utils_test.py
imports: from absl import logging
  import delta.compat
  from delta.layers import utils
  from delta.layers.utils import cut_or_padding
  from delta.layers.utils import compute_sen_lens
  from delta.layers.utils import compute_doc_lens
  from delta.layers.utils import split_one_doc_to_true_len_sens
label_desc: Use image node_id 6 for calling the LayerUtilsTest obj's underlying member method code with example usage: obj.test_compute_doc_lens() without return types