code: def get_weight(self, pred):
      neg_w = torch.cat([self.map_func(self.pos_neg), pred.new_ones(1)])
      pos_w = 1 + self.alpha * (1 - neg_w)
      neg_w = neg_w.view(1, -1).expand(self.n_i, self.n_c)
      pos_w = pos_w.view(1, -1).expand(self.n_i, self.n_c)
      return pos_w, neg_w
  
file_path: mmdetection/mmdet/models/losses/eqlv2_loss.py
imports: import logging
  from functools import partial
  from typing import Optional
  import torch
  import torch.distributed
  import torch.nn
  import torch.nn.functional
  from mmengine.logging import print_log
  from torch import Tensor
  from mmdet.registry import MODELS
label_desc: Use image node_id 6 for calling the EQLV2Loss obj's underlying member method code with example usage: obj.get_weight(pred) and returns: pos_w,  neg_w