code: def test_basic_mono(self):
      signal = np.arange(6)
      frame_length = 3
      frame_step = 2
  
      for rank in range(5):
          nd_signal = np.reshape(signal, (1,) * rank + signal.shape)
  
          # With padding, we pad the last frame with pad_value.
          result = shape_ops.frame(
              nd_signal,
              frame_length,
              frame_step,
              pad_end=True,
              pad_value=99,
          )
          expected_inner_frames = np.array(
              [[0, 1, 2], [2, 3, 4], [4, 5, 99]]
          )
          expected = np.reshape(
              expected_inner_frames,
              (1,) * rank + expected_inner_frames.shape,
          )
          self.assertAllEqual(expected, result)
  
          # Without padding, we drop the last frame.
          expected_inner_frames = np.array([[0, 1, 2], [2, 3, 4]])
          expected = np.reshape(
              expected_inner_frames,
              (1,) * rank + expected_inner_frames.shape,
          )
          result = shape_ops.frame(
              nd_signal, frame_length, frame_step, pad_end=False
          )
          self.assertAllEqual(expected, result)
  
imports: import numpy
  from tensorflow.python.eager import context
  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_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.kernel_tests.signal import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.signal import shape_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 6 for calling the FrameTest obj's underlying member method code with example usage: obj.test_basic_mono() without return types