Preheat the oven to 200ºC / 180ºC fan / gas mark 6.
Toss the cubed sweet potato in the oil and thyme and place on a baking tray. Bake in the oven for 30 minutes, until browned and cooked through.
Meanwhile, fry the pancetta until golden then set aside. In the same pan fry the onion slices until softened, but not coloured, then stir through the sugar, until dissolved and starting to colour.
Whisk together the eggs, double cream and the grated cheese. Grease a 25cm fluted flan tin with butter. Roll the sheet or pastry so that it fits the tin.
Lift the pastry sheet over the flan tin and press into the sides of the tin. Cut off the overhanging pastry and use this to cut into long thin strips. These will be used for the bandage lattice.
Prick the base of the pastry with a fork, then line with a circle of baking parchment and fill with baking beans. Bake blind in the oven for 10 minutes. Remove from the oven, tip out the baking beans and remove the baking parchment. Bake for another 5 minutes.
Layer the cooked onion into the base of the tart. Scatter half the sweet potato and bacon over the onions. Pour in the egg and cream mixture, then scatter over the remaining sweet potato and bacon.
Lay the pastry strips over the filling randomly, to create a bandage effect. Bake in the oven for 45 minutes, or until just set and golden on top. Remove from the oven and set aside to cool slightly.
Meanwhile, use a small cutter to stamp small eyes out of the slices of cheese. Place these on the slightly cooled tart peeking out from between the bandages. Place a sunflower seed in the centre of each piece of cheese for the pupils. Serve at room temperature.