code: def _nrows(tensor, out_type=dtypes.int32):
      if isinstance(tensor, ragged_tensor.RaggedTensor):
          return tensor.nrows(out_type=out_type)
      else:
          return array_ops.shape(tensor, out_type=out_type)[0]
  
imports: import typing
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import gen_string_ops
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import string_ops
  from tensorflow.python.ops.ragged import ragged_array_ops
  from tensorflow.python.ops.ragged import ragged_functional_ops
  from tensorflow.python.ops.ragged import ragged_math_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.util import compat
  from tensorflow.python.util import deprecation
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 16 for calling a global function with example usage: _nrows(tensor, out_type) and returns: tensor, array_ops