For the tomato sauce, heat the olive oil in a pan over a medium heat and gently fry the onion and garlic for 3-4 minutes, or until softened but not coloured.
Stir in the tomato purée, if using, and cook for one minute before adding the chopped tomatoes. Season to taste with the salt and freshly ground black pepper.
Bring to a simmer, then cover with a lid and cook over a low heat for a further 20 minutes. Taste again and correct the seasoning if needed, adding the sugar if necessary. Stir in the basil.
Pass the sauce through a mouli or fine sieve into a pan and set aside until needed.
Preheat the oven to 180C/350F/Gas 4.
For the stuffed tomatoes, trim the bases of the tomatoes so they sit flat on the work surface. Slice off the top third of the tomatoes and reserve (this will serve as the 'lid' for the stuffed tomatoes).
With a spoon, scoop out the pulp and juices of the tomatoes into a bowl. Add the juices and pulp to the pan with the tomato sauce.
Mix all of the remaining stuffed tomato ingredients, except the Comté cheese, together in a bowl until well combined. Stir in half of the cheese.
Season the insides of the tomatoes with a pinch of salt and freshly ground black pepper.
Divide the pork stuffing into four equal portions and roll each into a ball big enough to fit inside the tomatoes. Place the stuffing into the tomatoes, then sprinkle over the remaining cheese. Top each stuffed tomato with the reserved tomato 'lids'.
Brush a baking dish with a little olive oil then place the tomatoes on top. Drizzle with some more olive oil and cook in the oven for 25 minutes, or until the tomatoes are tender and the stuffing is cooked through.
To serve, reheat the tomato sauce and pour into the baking dish with the stuffed tomatoes. Alternatively, pour the sauce into individual serving dishes and top each with a stuffed tomato.