code: def entmax_bisect_loss(X, target, alpha=1.5, n_iter=50):
      """alpha-entmax loss: sparse alternative to cross-entropy.
  
      Computed using bisection, supporting arbitrary alpha > 1.
  
      Parameters
      ----------
      X : torch.Tensor, shape=(n_samples, n_classes)
          The input 2D tensor of predicted scores
  
      target : torch.LongTensor, shape=(n_samples,)
          The ground truth labels, 0 <= target < n_classes.
  
      alpha : float or torch.Tensor
          Tensor of alpha parameters (> 1) to use for each row of X. If scalar
          or python float, the same value is used for all rows. A value of
          alpha=2 corresponds to sparsemax, and alpha=1 would in theory recover
          softmax. For numeric reasons, this algorithm does not work with `alpha=1`:
          if you want softmax, we recommend `torch.nn.softmax`
  
      n_iter : int
          Number of bisection iterations. For float32, 24 iterations should
          suffice for machine precision.
  
      Returns
      -------
      losses, torch.Tensor, shape=(n_samples,)
          The loss incurred at each sample.
      """
      return EntmaxBisectLossFunction.apply(X, target, alpha, n_iter)
  
imports: import torch
  import torch.nn
  from torch.autograd import Function
  from ludwig.constants import IGNORE_INDEX_TOKEN_ID
  from ludwig.utils.entmax.activations import entmax15, sparsemax
  from ludwig.utils.entmax.root_finding import entmax_bisect, sparsemax_bisect
label_desc: Use image node_id 4 for calling a global function with example usage: entmax_bisect_loss(X, target, alpha, n_iter) and returns: EntmaxBisectLossFunction