code: def retrieve_seq_length_op(data):
      """An op to compute the length of a sequence. 0 are masked."""
      with tf.name_scope("GetLength"):
          used = tf.sign(
              tf.reduce_max(tf.abs(data), reduction_indices=2)
          )
          length = tf.reduce_sum(used, reduction_indices=1)
          length = tf.cast(length, tf.int32)
      return length
  
imports: from __future__ import division, print_function, absolute_import
  import logging
  import numpy
  import tensorflow.compat.v1
  from tensorflow.python.ops import array_ops
  from tensorflow.python.util.nest import is_sequence
  from ..None import config
  from ..None import utils
  from ..None import activations
  from ..None import initializations
  from ..None import variables
  from .normalization import batch_normalization
label_desc: Use image node_id 7 for calling a global function with example usage: retrieve_seq_length_op(data) and returns: length