code: def test_bce_equal_ce2(hybridize):
      N = 100
      loss1 = gluon.loss.SigmoidBCELoss(from_sigmoid=True)
      if hybridize:
          loss1.hybridize()
      loss2 = gluon.loss.SoftmaxCELoss(from_logits=True)
      if hybridize:
          loss2.hybridize()
      out1 = mx.np.random.uniform(0.1, 0.9, size=(N, 1))
      out2 = mx.np.log(
          mx.np.concatenate((1 - out1, out1), axis=1) + 1e-8
      )
      label = mx.np.round(mx.np.random.uniform(0, 1, size=(N, 1)))
      assert_almost_equal(
          loss1(out1, label).asnumpy(), loss2(out2, label).asnumpy()
      )
  
file_path: mxnet/tests/python/unittest/test_numpy_loss.py
imports: import mxnet
  import numpy
  from mxnet import gluon, autograd
  from mxnet.test_utils import assert_almost_equal, default_device, use_np
  from common import xfail_when_nonstandard_decimal_separator
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_bce_equal_ce2(hybridize) without return types