code: def equals_parameter_dict(
      this: mx.gluon.ParameterDict, that: mx.gluon.ParameterDict
  ) -> bool:
      """
      Structural equality check between two :class:`~mxnet.gluon.ParameterDict`
      objects.
  
      Two parameter dictionaries ``this`` and ``that`` are considered
      *structurally equal* if the following conditions are satisfied:
  
      1. They contain the same keys (modulo the key prefix which is stripped).
      2. The data in the corresponding value pairs is equal, as defined by the
         :func:`~mxnet.test_utils.almost_equal` function (in this case we call
         the function with ``equal_nan=True``, that is, two aligned ``NaN``
         values are always considered equal).
  
      Specializes :func:`equals` for invocations where the first parameter is an
      instance of the :class:`~mxnet.gluon.ParameterDict` class.
  
      Parameters
      ----------
      this, that
          Objects to compare.
  
      Returns
      -------
      bool
          A boolean value indicating whether ``this`` and ``that`` are
          structurally equal.
  
      See Also
      --------
      equals
          Dispatching function.
      """
      if type(this) != type(that):
          return False
  
      def strip_prefix_enumeration(key, prefix):
          if key.startswith(prefix):
              name = key[len(prefix) :]
          else:
              prefix, args = key.split("_", 1)
              name = prefix.rstrip("0123456789") + args
  
          return name
  
      this_param_names_stripped = [
          strip_prefix_enumeration(key, this.prefix)
          for key in this.keys()
      ]
      that_param_names_stripped = [
          strip_prefix_enumeration(key, that.prefix)
          for key in that.keys()
      ]
  
      if not this_param_names_stripped == that_param_names_stripped:
          return False
  
      for this_param_name, that_param_name in zip(
          this.keys(), that.keys()
      ):
          x = this[this_param_name].data().asnumpy()
          y = that[that_param_name].data().asnumpy()
          if not mx.test_utils.almost_equal(x, y, equal_nan=True):
              return False
  
      return True
  
imports: import numpy
  import mxnet
  from gluonts.core.component import equals, equals_default_impl, skip_encoding, tensor_to_numpy
label_desc: Use image node_id 1 for calling a global function with example usage: equals_parameter_dict(this, that) and returns: True, False, name, False, False