def _get_jinja_error_slug(tb_data):
 try:
  return [x for x in tb_data if (x[2] in ('top-level template code', 'template'))][(-1)]
 except IndexError:
  pass

def _get_jinja_error_slug ( tb_data ) : try : return [ x for x in tb_data if ( x [ 2 ] in ( 'top-level template code' , 'template' ) ) ] [ ( - 1 ) ] except IndexError : pass
return the line number where the template error was found .