class_docstr: Keeps track of `Function` protos for pprof profile.
docstr: Returns index of the function, adding the function if needed.
  
  Args:
    file_path: (string) Path to file where the function is defined.
    function_name: (string) Function name.
    function_start_line: (integer) Start line number of function definition.
  
  Returns:
    Function index.
docstr_tok: ["Returns","index","of","the","function",",","adding","the","function","if","needed",".","Args",":","file_path",":","(","string",")","Path","to","file","where","the","function","is","defined",".","function_name",":","(","string",")","Function","name",".","function_start_line",":","(","integer",")","Start","line","number","of","function","definition",".","Returns",":","Function","index","."]
code: def index_of(self, file_path, function_name, function_start_line):
      """Returns index of the function, adding the function if needed.
  
      Args:
        file_path: (string) Path to file where the function is defined.
        function_name: (string) Function name.
        function_start_line: (integer) Start line number of function definition.
  
      Returns:
        Function index.
      """
      function_key = (file_path, function_name, function_start_line)
      if function_key in self._function_key_to_function:
          return self._function_key_to_function[function_key].id
      else:
          # Function indexes should start from 1
          function_index = len(self._function_key_to_function) + 1
          function = profile_pb2.Function()
          function.id = function_index
          function.name = self._string_table.index_of(function_name)
          function.filename = self._string_table.index_of(file_path)
          function.start_line = function_start_line
          self._function_key_to_function[function_key] = function
          return function_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 Functions obj's underlying member method code with example usage: obj.index_of(file_path, function_name, function_start_line) and returns: self, function_index