code: def test_box_encode_op():
      anchors = mx.nd.array(
          [[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]]
      ).reshape((1, -1, 4))
      refs = mx.nd.array(
          [[0.1, 0.2, 0.3, 0.4], [0.5, 0.6, 0.7, 0.8]]
      ).reshape((1, -1, 4))
      samples = mx.nd.array([[0, 1]])
      matches = mx.nd.array([[0, 1]])
      means = mx.nd.array([0.0, 0.0, 0.0, 0.0])
      stds = mx.nd.array([0.1, 0.1, 0.2, 0.2])
      Y, mask = mx.nd.contrib.box_encode(
          samples, matches, anchors, refs, means, stds
      )
      assert_allclose(
          Y.asnumpy(), np.zeros((1, 2, 4)), atol=1e-5, rtol=1e-5
      )
      assert_allclose(
          mask.asnumpy(),
          np.array([[[0.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0, 1.0]]]),
          atol=1e-5,
          rtol=1e-5,
      )
  
file_path: mxnet/tests/python/unittest/test_contrib_operator.py
imports: from __future__ import print_function
  import numpy
  import mxnet
  import random
  import itertools
  from numpy.testing import assert_allclose, assert_array_equal
  from mxnet.test_utils import *
  from common import assert_raises_cudnn_not_satisfied, xfail_when_nonstandard_decimal_separator
  import unittest
label_desc: Use image node_id 7 for calling a global function with example usage: test_box_encode_op() without return types