code: def test_weighted_average(x, weights) -> None:
      x = mx.nd.array(x)
      weights = mx.nd.array(weights)
      assert weighted_average(
          F=mx.nd, x=x, weights=weights, axis=0
      ) == mx.nd.array([2.0])
      assert weighted_average(
          F=mx.nd,
          x=x,
          weights=weights,
          axis=0,
          include_zeros_in_denominator=True,
      ) == mx.nd.array([1.0])
  
file_path: gluonts/test/mx/test_mx_util.py
imports: import pytest
  import itertools
  import tempfile
  from pathlib import Path
  from typing import List
  import mxnet
  import numpy
  from gluonts.mx import Tensor
  from gluonts.mx.util import cumsum, export_symb_block, hybrid_block_to_symbol_block, import_symb_block, mx_switch, weighted_average
label_desc: Use image node_id 5 for calling a global function with example usage: test_weighted_average(x, weights) without return types