class_docstr: Keeps track of strings to add to string_table in pprof proto.
docstr: Get index of value_str in the string table.
  
  If value_str is not in the string table, we will add it at the end
  and then return the new index.
  Args:
    value_str: (string) Value to lookup/add in/to the string table.
  
  Returns:
    Index of value_str in the string table.
docstr_tok: ["Get","index","of","value_str","in","the","string","table",".","If","value_str","is","not","in","the","string","table",",","we","will","add","it","at","the","end","and","then","return","the","new","index",".","Args",":","value_str",":","(","string",")","Value","to","lookup\/add","in\/to","the","string","table",".","Returns",":","Index","of","value_str","in","the","string","table","."]
code: def index_of(self, value_str):
      """Get index of value_str in the string table.
  
      If value_str is not in the string table, we will add it at the end
      and then return the new index.
      Args:
        value_str: (string) Value to lookup/add in/to the string table.
  
      Returns:
        Index of value_str in the string table.
      """
      if value_str is None:
          value_str = ""
      if value_str in self._string_to_index:
          return self._string_to_index[value_str]
      index = len(self._string_table)
      self._string_table.append(value_str)
      self._string_to_index[value_str] = index
      return index
  
imports: from collections import defaultdict
  from collections import namedtuple
  import gzip
  import os
  import string
  import sys
  import time
  from proto import profile_pb2
label_desc: Use image node_id 2 for calling the StringTable obj's underlying member method code with example usage: obj.index_of(value_str) and returns: index, self