code: def test_create_np_param():
      M, K, N = 10, 9, 20
  
      def check_block_params(
          x, TestBlock, hybridize, expected_type, initializer
      ):
          net = TestBlock()
          net.initialize(initializer())
          if hybridize:
              net.hybridize()
          net(x)
          params = net.collect_params()
          for _, v in params.items():
              assert type(v.data()) is expected_type
  
      @use_np
      class TestBlock1(gluon.HybridBlock):
          def __init__(self):
              super(TestBlock1, self).__init__()
              self.w = gluon.Parameter(
                  "w", shape=(K, N), allow_deferred_init=True
              )
  
          def forward(self, x):
              device = x.device
              return np.dot(x, self.w.data(device))
  
      x = mx.np.random.uniform(size=(M, K))
      for initializer in [
          mx.initializer.Uniform,
          mx.initializer.Normal,
      ]:
          check_block_params(
              x, TestBlock1, False, mx.np.ndarray, initializer
          )
          check_block_params(
              x, TestBlock1, True, mx.np.ndarray, initializer
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  import os
  from uuid import uuid4
  import numpy
  import mxnet
  from mxnet import gluon, autograd, np, npx
  from mxnet.test_utils import use_np, assert_almost_equal, check_gluon_hybridize_consistency, assert_allclose
  from mxnet.gluon import nn
  from mxnet.base import MXNetError
  import random
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: test_create_np_param() and returns: np