class_docstr: The class for implementing EmbLossV1. This was partially adapted from
  https://github.com/whai362/pan_pp.pytorch.
  
  Args:
      feature_dim (int): The dimension of the feature. Defaults to 4.
      delta_aggregation (float): The delta for aggregation. Defaults to 0.5.
      delta_discrimination (float): The delta for discrimination.
          Defaults to 1.5.
code: def __init__(
      self,
      feature_dim: int = 4,
      delta_aggregation: float = 0.5,
      delta_discrimination: float = 1.5,
  ) -> None:
      super().__init__()
      self.feature_dim = feature_dim
      self.delta_aggregation = delta_aggregation
      self.delta_discrimination = delta_discrimination
      self.weights = (1.0, 1.0)
  
imports: import warnings
  from typing import Dict, Sequence, Tuple, Union
  import numpy
  import torch
  import torch.nn.functional
  from mmdet.models.utils import multi_apply
  from torch import nn
  from mmocr.registry import MODELS
  from mmocr.structures import TextDetDataSample
  from .seg_based_module_loss import SegBasedModuleLoss
label_desc: Use image node_id 1 to create a new PANEmbLossV1 object from inherited base classes: nn with example: obj = PANEmbLossV1(feature_dim, delta_aggregation, delta_discrimination)