code: def test_binary_cross_entropy_gen(oasis_logits):
      logits1, _, target = oasis_logits
  
      loss_fn = OASISGeneratorLoss()
  
      output = loss_fn(logits1, target)
  
      est1 = torch.gather(
          -1.0 * F.log_softmax(logits1, dim=1),
          1,
          target.unsqueeze(1) + 1,
      ).mean()
  
      # numerical precision issues
      assert torch.allclose(output, est1, rtol=0.01)
  
imports: import pytest
  import torch
  import torch.nn.functional
  from neuralcompression.loss_fn import OASISDiscriminatorLoss, OASISGeneratorLoss
label_desc: Use image node_id 3 for calling a global function with example usage: test_binary_cross_entropy_gen(oasis_logits) without return types