class_docstr: Keeps track of `Location` protos for pprof profile.
  
  `Locations` store information about function call locations.
docstr: Returns index of the location, adding the location if needed.
  
  Args:
    file_path: (string) Path to file that makes the call.
    line_number: (integer) Call line number.
    called_function_name: (string) Function name of the function called at
      `file_path` and `line_number`.
    called_file_path: (string) Path to file where the called function is
      defined.
    called_function_start_line: (integer) Start line number of called
      function definition in `called_file_path` file.
  
  Returns:
    Index of location.
docstr_tok: ["Returns","index","of","the","location",",","adding","the","location","if","needed",".","Args",":","file_path",":","(","string",")","Path","to","file","that","makes","the","call",".","line_number",":","(","integer",")","Call","line","number",".","called_function_name",":","(","string",")","Function","name","of","the","function","called","at","`","file_path","`","and","`","line_number","`",".","called_file_path",":","(","string",")","Path","to","file","where","the","called","function","is","defined",".","called_function_start_line",":","(","integer",")","Start","line","number","of","called","function","definition","in","`","called_file_path","`","file",".","Returns",":","Index","of","location","."]
code: def index_of(
      self,
      file_path,
      line_number,
      called_function_name,
      called_file_path,
      called_function_start_line,
  ):
      """Returns index of the location, adding the location if needed.
  
      Args:
        file_path: (string) Path to file that makes the call.
        line_number: (integer) Call line number.
        called_function_name: (string) Function name of the function called at
          `file_path` and `line_number`.
        called_file_path: (string) Path to file where the called function is
          defined.
        called_function_start_line: (integer) Start line number of called
          function definition in `called_file_path` file.
  
      Returns:
        Index of location.
      """
      location_key = (file_path, called_function_name, line_number)
      if location_key in self._location_key_to_location:
          location = self._location_key_to_location[location_key]
          return location.id
      else:
          # Location indexes should start from 1
          location_index = len(self._location_key_to_location) + 1
          location = profile_pb2.Location()
          location.id = location_index
          self._location_key_to_location[location_key] = location
  
          line = location.line.add()
          line.function_id = self._functions.index_of(
              called_file_path,
              called_function_name,
              called_function_start_line,
          )
          line.line = line_number
          return location_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 Locations obj's underlying member method code with example usage: obj.index_of(file_path, line_number, called_function_name, called_file_path, called_function_start_line) and returns: location, location_index