docstr: Takes a list of arrays of the same shape and computes the element wise
  weighted average.
  
  Parameters
  ----------
  arrays
      List of NDArrays with the same shape that will be averaged.
  weights
      List of weights for the parameter average.
  
  Returns
  -------
  The average of the NDArrays in the same context as arrays[0].
docstr_tok: ["Takes","a","list","of","arrays","of","the","same","shape","and","computes","the","element","wise","weighted","average",".","Parameters","--","--","--","--","--","arrays","List","of","NDArrays","with","the","same","shape","that","will","be","averaged",".","weights","List","of","weights","for","the","parameter","average",".","Returns","--","--","--","-","The","average","of","the","NDArrays","in","the","same","context","as","arrays","[","0","]","."]
code: def average_arrays(
      arrays: List[mx.nd.NDArray], weights: List[float]
  ) -> mx.nd.NDArray:
      r"""
      Takes a list of arrays of the same shape and computes the element wise
      weighted average.
  
      Parameters
      ----------
      arrays
          List of NDArrays with the same shape that will be averaged.
      weights
          List of weights for the parameter average.
  
      Returns
      -------
      The average of the NDArrays in the same context as arrays[0].
      """
  
      def _assert_shapes(arrays):
          shape_set = {array.shape for array in arrays}
          assert len(shape_set) == 1, (
              "All arrays should be the same shape. Found arrays with these"
              " shapes instead :{}".format(shape_set)
          )
  
      _assert_shapes(arrays)
  
      if not arrays:
          raise ValueError("arrays is empty.")
      if len(arrays) == 1:
          return arrays[0]
      return mx.nd.add_n(*[a * w for a, w in zip(arrays, weights)])
  
imports: import glob
  import json
  import logging
  from typing import Dict, List, Tuple
  import mxnet
  import mxnet.gluon.nn
  import numpy
  from gluonts.core.component import validated
  from .callback import Callback
label_desc: Use image node_id 6 for calling the AveragingStrategy obj's underlying member method code with example usage: obj.average_arrays(arrays, weights) and returns: mx, arrays