code: def test_focal_loss_base(self):
      target = torch.randint(size=(5, 1), low=0, high=10)
      score = torch.randn((5, 10))
  
      config = FocalLoss.Config()
      config.gamma = 0
      config.alpha = 1
      loss_fn = FocalLoss(config=config)
  
      val = loss_fn(
          score,
          target.reshape(
              5,
          ),
      )
      val2 = F.nll_loss(
          F.log_softmax(score, 1, dtype=torch.float32),
          target.reshape(
              5,
          ),
      )
  
      self.assertAlmostEqual(val.item(), val2.item())
  
imports: import unittest
  import torch
  import torch.nn.functional
  from pytext.loss.loss import BinaryFocalLoss, FocalLoss
label_desc: Use image node_id 1 for calling the FocalLossTest obj's underlying member method code with example usage: obj.test_focal_loss_base() without return types