class_docstr: FocalLossCost.
  
  Args:
      alpha (Union[float, int]): focal_loss alpha. Defaults to 0.25.
      gamma (Union[float, int]): focal_loss gamma. Defaults to 2.
      eps (float): Defaults to 1e-12.
      binary_input (bool): Whether the input is binary. Currently,
          binary_input = True is for masks input, binary_input = False
          is for label input. Defaults to False.
      weight (Union[float, int]): Cost weight. Defaults to 1.
class_docstr_tok: ["FocalLossCost",".","Args",":","alpha","(","Union","[","float",",","int","]",")",":","focal_loss","alpha",".","Defaults","to","0.25.","gamma","(","Union","[","float",",","int","]",")",":","focal_loss","gamma",".","Defaults","to","2.","eps","(","float",")",":","Defaults","to","1e-12",".","binary_input","(","bool",")",":","Whether","the","input","is","binary",".","Currently",",","binary_input","=","True","is","for","masks","input",",","binary_input","=","False","is","for","label","input",".","Defaults","to","False",".","weight","(","Union","[","float",",","int","]",")",":","Cost","weight",".","Defaults","to","1","."]
docstr: Compute match cost.
  
  Args:
      pred_instances (:obj:`InstanceData`): Predicted instances which
          must contain ``scores`` or ``masks``.
      gt_instances (:obj:`InstanceData`): Ground truth which must contain
          ``labels`` or ``mask``.
      img_meta (Optional[dict]): Image information. Defaults to None.
  
  Returns:
      Tensor: Match Cost matrix of shape (num_preds, num_gts).
code: def __call__(
      self,
      pred_instances: InstanceData,
      gt_instances: InstanceData,
      img_meta: Optional[dict] = None,
      **kwargs,
  ) -> Tensor:
      """Compute match cost.
  
      Args:
          pred_instances (:obj:`InstanceData`): Predicted instances which
              must contain ``scores`` or ``masks``.
          gt_instances (:obj:`InstanceData`): Ground truth which must contain
              ``labels`` or ``mask``.
          img_meta (Optional[dict]): Image information. Defaults to None.
  
      Returns:
          Tensor: Match Cost matrix of shape (num_preds, num_gts).
      """
      if self.binary_input:
          pred_masks = pred_instances.masks
          gt_masks = gt_instances.masks
          return self._mask_focal_loss_cost(pred_masks, gt_masks)
      else:
          pred_scores = pred_instances.scores
          gt_labels = gt_instances.labels
          return self._focal_loss_cost(pred_scores, gt_labels)
  
imports: from abc import abstractmethod
  from typing import Optional, Union
  import torch
  import torch.nn.functional
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import TASK_UTILS
  from mmdet.structures.bbox import bbox_overlaps, bbox_xyxy_to_cxcywh
label_desc: Use image node_id 4 for calling the FocalLossCost obj's underlying member method code with example usage: obj.__call__(pred_instances, gt_instances, img_meta) and returns: self, self