code: def test_np_get_constant():
      const_arr = _np.random.uniform(0, 100, size=(10, 10)).astype(
          _np.float32
      )
  
      class Foo(gluon.HybridBlock):
          def __init__(self):
              super(Foo, self).__init__()
              self.weight = gluon.Constant(const_arr)
  
          def forward(self, x):
              device = x.device
              return x + self.weight.data(device).astype(np.float32)
  
      x = np.random.uniform(size=const_arr.shape, dtype=const_arr.dtype)
      for hybridize in [False, True]:
          foo = Foo()
          if hybridize:
              foo.hybridize()
          foo.initialize()
          out = foo(x)
          assert_almost_equal(
              out.asnumpy(),
              (x.asnumpy() + const_arr),
              atol=1e-5,
              rtol=1e-4,
              use_broadcast=False,
          )
  
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 5 for calling a global function with example usage: test_np_get_constant() and returns: unknown