def _get_function_and_line(stack):
  """Gets the function and line number of the caller according to `stack`."""
  caller_name = stack[1].function
  caller_file = stack[1].filename
  caller_line = stack[1].lineno
  return caller_name, caller_file, caller_line
Gets the function and line number of the caller according to `stack`.
language/canine/tensor_contracts.py