code: def tensorize(self, batch):
      new_batch = []
      for i in range(len(batch)):
          # batch[i - 1] = No. of -ve ctxs in previous example; +1 for +ve ctx
          pos_ctx_idx = (
              i if i == 0 else new_batch[-1] + batch[i - 1] + 1
          )
          new_batch.append(pos_ctx_idx)
      return super().tensorize(new_batch)
  
imports: from typing import Any, Dict, List, Optional, Tuple
  from pytext.common.constants import SpecialTokens
  from pytext.config.component import ComponentType, create_component
  from pytext.data.bert_tensorizer import BERTTensorizer, build_fairseq_vocab
  from pytext.data.roberta_tensorizer import RoBERTaTensorizer
  from pytext.data.tensorizers import LabelTensorizer
  from pytext.data.tokenizers import Tokenizer
  from pytext.data.utils import Vocabulary
  from pytext.utils.file_io import PathManager
label_desc: Use image node_id 2 for calling the PositiveLabelTensorizerForDenseRetrieval obj's underlying member method code with example usage: obj.tensorize(batch) and returns: super