code: def _one_hot_targets(self, targets, num_classes):
      targets_one_hot = torch.nn.functional.one_hot(
          targets, num_classes=num_classes
      )
      targets_one_hot = torch.moveaxis(targets_one_hot, -1, 1)
      return targets_one_hot
  
file_path: pytorch-toolbelt/pytorch_toolbelt/losses/focal.py
imports: from functools import partial
  from typing import Optional
  import torch
  from torch import Tensor, nn
  from torch.nn.modules.loss import _Loss
  from .functional import focal_loss_with_logits, softmax_focal_loss_with_logits
  from pytorch_toolbelt.utils import pytorch_toolbelt_deprecated
label_desc: Use image node_id 4 for calling the BinaryFocalLoss obj's underlying member method code with example usage: obj._one_hot_targets(targets, num_classes) and returns: targets_one_hot