code: def forward(self, input, embs, label):
      n = input.shape[0]
      log_target = torch.log(
          torch.sigmoid(
              torch.sum(torch.mul(embs, self.weights(label)), 1)
          )
      )
      negs = (
          torch.multinomial(
              self.sample_weights,
              self.num_sampled * n,
              replacement=True,
          )
          .view(n, self.num_sampled)
          .to(input.device)
      )
      noise = torch.neg(self.weights(negs))
      sum_log_sampled = torch.sum(
          torch.log(torch.sigmoid(torch.bmm(noise, embs.unsqueeze(2)))),
          1,
      ).squeeze()
  
      loss = log_target + sum_log_sampled
      return -loss.sum() / n
  
imports: import datetime
  import math
  import os
  import sys
  import time
  from collections import defaultdict
  import numpy
  import torch
  import torch.multiprocessing
  import torch.nn
  import torch.nn.functional
  from numpy import random
  from torch.nn.parallel import DistributedDataParallel
  from torch.nn.parameter import Parameter
  from tqdm.auto import tqdm
  from utils import *
  import dgl
  import dgl.function
label_desc: Use image node_id 3 for calling the NSLoss obj's underlying member method code with example usage: obj.forward(input, embs, label) and returns: unknown