human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Rider, Manufacturer, Laps, Time/Retired, Grid
###Question: What is the average number of laps with an accident time/retired, aprilia manufacturer and a grid of 27?
gpt
SELECT AVG Laps FROM table WHERE Time/Retired = accident AND Manufacturer = aprilia AND Grid = 27