docstr: Look up embedding vectors of tokens.
  
  Arguments:
      tokens: a token or a list of tokens. if `tokens` is a string,
          returns a 1-D tensor of shape `self.dim`; if `tokens` is a
          list of strings, returns a 2-D tensor of shape=(len(tokens),
          self.dim).
      lower_case_backup : Whether to look up the token in the lower case.
          If False, each token in the original case will be looked up;
          if True, each token in the original case will be looked up first,
          if not found in the keys of the property `stoi`, the token in the
          lower case will be looked up. Default: False.
  
  Examples:
      >>> examples = ['chip', 'baby', 'Beautiful']
      >>> vec = text.vocab.GloVe(name='6B', dim=50)
      >>> ret = vec.get_vecs_by_tokens(tokens, lower_case_backup=True)
code: def get_vecs_by_tokens(self, tokens, lower_case_backup=False):
      """Look up embedding vectors of tokens.
  
      Arguments:
          tokens: a token or a list of tokens. if `tokens` is a string,
              returns a 1-D tensor of shape `self.dim`; if `tokens` is a
              list of strings, returns a 2-D tensor of shape=(len(tokens),
              self.dim).
          lower_case_backup : Whether to look up the token in the lower case.
              If False, each token in the original case will be looked up;
              if True, each token in the original case will be looked up first,
              if not found in the keys of the property `stoi`, the token in the
              lower case will be looked up. Default: False.
  
      Examples:
          >>> examples = ['chip', 'baby', 'Beautiful']
          >>> vec = text.vocab.GloVe(name='6B', dim=50)
          >>> ret = vec.get_vecs_by_tokens(tokens, lower_case_backup=True)
      """
      to_reduce = False
  
      if not isinstance(tokens, list):
          tokens = [tokens]
          to_reduce = True
  
      hit = 0
      cnt = 0
      indices = []
      if not lower_case_backup:
          for token in tokens:
              result = self[token]
              indices.append(result[0])
              hit += int(result[1])
              cnt += 1
      else:
          for token in tokens:
              result = (
                  self[token]
                  if token in self.stoi
                  else self[token.lower()]
              )
              indices.append(result[0])
              hit += int(result[1])
              cnt += 1
  
      vecs = torch.stack(indices)
      return vecs[0] if to_reduce else vecs, hit, cnt
  
imports: import os
  import pickle
  import re
  import warnings
  from collections import Counter
  from functools import lru_cache
  import numpy
  import torch
  from nltk.tokenize import word_tokenize
  from torchtext.vocab import GloVe, Vectors
  from .None import constants
label_desc: Use image node_id 3 for calling the WordEmbModel obj's underlying member method code with example usage: obj.get_vecs_by_tokens(tokens, lower_case_backup) and returns: unknown,  hit,  cnt