code: def _get_svdf_output_using_numpy(input_values, weights):
      """Compute svdf output using numpy for expected values.
  
      NOTE: Use this helper function as a way to verify computations in tensorflow.
      This function assumes linear activation for svdf and projection.
      Args:
        input_values: ndarray (shape=[batch_size, sequence_length, input_dim]).
        weights: A list of 3 ndarrays from _get_test_svdf_layer_weights().
  
      Returns:
        output_values: ndarray with sequence of output values from svdf layer.
      """
  
      def _compute_single_sequence_output(sequence_input, weights):
          feature_activations = []
          for i in range(input_values.shape[1]):
              feature_activations.append(
                  np.dot(sequence_input[i, :], weights[0])
              )
          memory_size = weights[1].shape[0]
          feature_activations = [np.zeros(weights[1].shape[1])] * (
              memory_size - 1
          ) + feature_activations
          time_activations = []
          for i in range(memory_size - 1, len(feature_activations)):
              time_activations.append(
                  weights[2]
                  + np.sum(
                      np.vstack(
                          feature_activations[
                              i - memory_size + 1 : i + 1
                          ]
                      )
                      * weights[1],
                      axis=0,
                  )
              )
          return time_activations
  
      outputs = np.zeros(
          (
              input_values.shape[0],
              input_values.shape[1],
              weights[2].shape[0],
          )
      )
      for b in range(input_values.shape[0]):
          outputs[b, :, :] = _compute_single_sequence_output(
              input_values[b, :, :], weights
          )
      return outputs
  
file_path: model_search/model_search/ops/svdf_conv_test.py
imports: from absl import logging
  from model_search.ops import svdf_conv
  import numpy
  from six.moves import range
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling a global function with example usage: _get_svdf_output_using_numpy(input_values, weights) and returns: outputs, time_activations