class_docstr: SentenceBERT Flask resource.
  The PUT method is to get token/str embedding.
class_docstr_tok: ["SentenceBERT","Flask","resource",".","The","PUT","method","is","to","get","token\/str","embedding","."]
code: def get_emb(self, query: Union[List[str], str, torch.Tensor]):
      if isinstance(query, str):
          query = [query]
      elif isinstance(query, torch.Tensor):
          sentence_list = []
          for q in query:
              text = self.tokenizer.ids_to_text(q)
              sentence_list.append(text)
          query = sentence_list
      emb = self.bert_model.encode_multi_process(
          sentences=query,
          pool=self.pool,
          batch_size=self.sentence_bert_batch,
      )
      return emb
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/retrieval_services/bert_service.py
imports: import base64
  import pickle
  import threading
  import time
  from typing import List, Union
  import torch
  from flask import Flask, jsonify, request
  from flask_restful import Api, Resource
  from sentence_transformers import SentenceTransformer
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
label_desc: Use image node_id 3 for calling the SentenceBertResource obj's underlying member method code with example usage: obj.get_emb(query) and returns: emb