tools/traffic_annotation/scripts/generator_utils.py
def find_last_index(doc):
  """
  Returns: int
    The last cursor index (loc) of the template document.
  """
  body = extract_body(document=doc)
  contents = body["content"]
  last_index = contents[-1]["endIndex"]
  return last_index - 1

  Returns: int
    The last cursor index (loc) of the template document.
  
int
The last cursor index (loc) of the template document.
int The last cursor index ( loc ) of the template document .
def find_last_index(doc):
  body = extract_body(document=doc)
  contents = body["content"]
  last_index = contents[-1]["endIndex"]
  return last_index - 1
def find_last_index ( doc ) : body = extract_body ( document = doc ) contents = body [ "content" ] last_index = contents [ - 1 ] [ "endIndex" ] return last_index - 1
Returns: int
The last cursor index (loc) of the template document.
Returns : int The last cursor index ( loc ) of the template document .
"""
  Returns: int
    The last cursor index (loc) of the template document.
  """
doc