docstr: Tokenizes a text and maps tokens to token-ids
docstr_tok: ["Tokenizes","a","text","and","maps","tokens","to","token-ids"]
code: def tokenize(self, texts: Union[List[str], List[Tuple[str, str]]]):
      """
      Tokenizes a text and maps tokens to token-ids
      """
      if not isinstance(texts[0], dict):
          raise AttributeError(
              "Asym. model requires that texts are passed as dicts: {'key': 'text'}"
          )
  
      module_key = None
  
      for lookup in texts:
          text_key, text = next(iter(lookup.items()))
          if module_key is None:
              module_key = text_key
  
          assert text_key == module_key  # Mixed batches are not allowed
      return self.sub_modules[module_key][0].tokenize(texts)
  
file_path: sentence-transformers/sentence_transformers/models/Asym.py
imports: from torch import Tensor
  from torch import nn
  import os
  import json
  from ..util import import_from_string
  from collections import OrderedDict
  from typing import List, Dict, Union, Tuple
label_desc: Use image node_id 5 for calling the Asym obj's underlying member method code with example usage: obj.tokenize(texts) and returns: self