code: def _get_input_tensors(self, tokens, spans, spans_ner_label):
      start2idx = []
      end2idx = []
  
      bert_tokens = []
      bert_tokens.append(self.tokenizer.cls_token)
      for token in tokens:
          start2idx.append(len(bert_tokens))
          sub_tokens = self.tokenizer.tokenize(token)
          bert_tokens += sub_tokens
          end2idx.append(len(bert_tokens) - 1)
      bert_tokens.append(self.tokenizer.sep_token)
  
      indexed_tokens = self.tokenizer.convert_tokens_to_ids(bert_tokens)
      tokens_tensor = torch.tensor([indexed_tokens])
  
      bert_spans = [
          [start2idx[span[0]], end2idx[span[1]], span[2]]
          for span in spans
      ]
      bert_spans_tensor = torch.tensor([bert_spans])
  
      spans_ner_label_tensor = torch.tensor([spans_ner_label])
  
      return tokens_tensor, bert_spans_tensor, spans_ner_label_tensor
  
imports: import os
  import sys
  import torch
  from torch import nn
  import torch.nn.functional
  from torch.nn import CrossEntropyLoss
  from allennlp.nn.util import batched_index_select
  from allennlp.nn import util
  from allennlp.modules import FeedForward
  import numpy
  from transformers import BertTokenizer, BertPreTrainedModel, BertModel
  from transformers import AlbertTokenizer, AlbertPreTrainedModel, AlbertModel
  import os
  import json
  import logging
label_desc: Use image node_id 3 for calling the EntityModel obj's underlying member method code with example usage: obj._get_input_tensors(tokens, spans, spans_ner_label) and returns: tokens_tensor,  bert_spans_tensor,  spans_ner_label_tensor