nodes: 0, module; 1, function_definition; 2, function_name:sorted_index; 3, parameters; 4, block; 5, identifier:values; 6, identifier:x; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, comment:"""
      For list, values, returns the index location of element x. If x does not exist will raise an error.
  
      :param values: list
      :param x: item
      :return: integer index
      """; 12, assignment; 13, assignment; 14, binary_operator:values[i:j].index(x) + i; 15, identifier:i; 16, call; 17, identifier:j; 18, call; 19, call; 20, identifier:i; 21, identifier:bisect_left; 22, argument_list; 23, identifier:bisect_right; 24, argument_list; 25, attribute; 26, argument_list; 27, identifier:values; 28, identifier:x; 29, identifier:values; 30, identifier:x; 31, subscript; 32, identifier:index; 33, identifier:x; 34, identifier:values; 35, slice; 36, identifier:i; 37, identifier:j
code: def sorted_index(values, x):
      """
      For list, values, returns the index location of element x. If x does not exist will raise an error.
  
      :param values: list
      :param x: item
      :return: integer index
      """
      i = bisect_left(values, x)
      j = bisect_right(values, x)
      return values[i:j].index(x) + i