docstr: Perform average pool along row of a 2-D matrix based on row_seq.
  
  Args:
    input_matrix: A 2-D matrix.
    row_seq: Cumulative pooling sequence along row.
    overlapping: Whether or not use overlapping when pooling.
  
  Returns:
    A 2-D matrix, with
      * num_rows = len(row_seq)-1
      * num_cols = input_matrix.num_cols.
code: def _AvgPoolAlongRows(self, input_matrix, row_seq, overlapping):
      """Perform average pool along row of a 2-D matrix based on row_seq.
  
      Args:
        input_matrix: A 2-D matrix.
        row_seq: Cumulative pooling sequence along row.
        overlapping: Whether or not use overlapping when pooling.
  
      Returns:
        A 2-D matrix, with
          * num_rows = len(row_seq)-1
          * num_cols = input_matrix.num_cols.
      """
      output_image = np.zeros(input_matrix.shape[1])
      row_max = row_seq[-1]
      for i in range(row_seq.shape[0] - 1):
          row_start = row_seq[i]
          row_end = (
              row_seq[i + 1] + 1 if overlapping else row_seq[i + 1]
          )
          row_end = min(row_end, row_max)
          output_image = np.vstack(
              (
                  output_image,
                  np.mean(input_matrix[row_start:row_end, :], axis=0),
              )
          )  # axis 0 is along row
      # remove the sentinel row
      return output_image[1:, :]
  
imports: import math
  import numpy
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the FractionalAvgTest obj's underlying member method code with example usage: obj._AvgPoolAlongRows(input_matrix, row_seq, overlapping) and returns: output_image