class_docstr: Apache Beam accumulator to compute the mean/stdev of svg commands.
class_docstr_tok: ["Apache","Beam","accumulator","to","compute","the","mean\/stdev","of","svg","commands","."]
code: def add_input(self, sum_count, new_input):
      (curr_sum, sum_sq, count) = sum_count
      # new_input is a dict with keys = ['seq_len', 'sequence']
      new_seq_len = new_input["seq_len"]
  
      # remove padding and eos from sequence
      new_input = np.reshape(np.array(new_input["sequence"]), [-1, 10])
      new_input = new_input[:new_seq_len, :]
  
      # accumulate new_sum and new_sum_sq
      new_sum = np.sum([curr_sum, np.sum(new_input, axis=0)], axis=0)
      new_sum_sq = np.sum(
          [sum_sq, np.sum(np.power(new_input, 2), axis=0)], axis=0
      )
      return new_sum, new_sum_sq, count + new_seq_len
  
imports: from absl import app
  from absl import flags
  import apache_beam
  from magenta.models.svg_vae import svg_utils
  import numpy
  from tensor2tensor.data_generators import generator_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling the MeanStddev obj's underlying member method code with example usage: obj.add_input(sum_count, new_input) and returns: new_sum,  new_sum_sq,  unknown