code: def _sum_rows(x):
      """Returns a vector summing up each row of the matrix x."""
      # _sum_rows(x) is equivalent to math_ops.reduce_sum(x, 1) when x is
      # a matrix.  The gradient of _sum_rows(x) is more efficient than
      # reduce_sum(x, 1)'s gradient in today's implementation. Therefore,
      # we use _sum_rows(x) in the nce_loss() computation since the loss
      # is mostly used for training.
      cols = array_ops.shape(x)[1]
      ones_shape = array_ops_stack.stack([cols, 1])
      ones = array_ops.ones(ones_shape, x.dtype)
      return array_ops.reshape(math_ops.matmul(x, ones), [-1])
  
imports: import math
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import candidate_sampling_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import ctc_ops
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import embedding_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gen_sparse_ops
  from tensorflow.python.ops import linalg_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_fused_batch_norm_grad
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import device_context
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.deprecation import deprecated_args
  from tensorflow.python.util.deprecation import deprecated_argument_lookup
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 27 for calling a global function with example usage: _sum_rows(x) and returns: array_ops