Preheat the oven to 200°C/fan 180°C/gas 6. Place the aubergine in a roasting tin with 2 of the garlic cloves – left whole and unpeeled – and the thyme. Season with salt and pepper and coat everything in the oil. Roast in the oven for 30-40 minutes, turning every so often, until soft and golden.

While the aubergine is roasting, make the refried beans. Heat the oil in a pan over a medium heat. Add the onion and fry for 5-10 minutes, until starting to turn golden. Add the garlic and the chopped chilli and cook for a further minute. Add the drained pulses, coriander stalks and chipotle paste. Cook for 10-12 minutes more, then season.

To finish the roasted aubergines, heat a splash of oil in a pan over a medium heat and fry the onion for about 5 minutes, or until translucent.

Peel and crush the remaining 3 garlic cloves and add to the pan. Fry for a further 2 minutes before adding the chopped tomatoes, red pepper, sugar, tomato purée and soy sauce. Bring to the boil, season and simmer to reduce by about a third.

Add the chipotle paste, lime juice and coriander stalks and bring back to the boil. Finally, add the roasted aubergine cubes and the coriander leaves, and check the seasoning. Mix all the salsa ingredients together and leave to one side.

To make the gorditas, mix the masa harina, salt and baking powder in a bowl. Make a well in the centre and slowly add the water until you have a workable dough. Shape into 8 pieces and roll each into a 10cm circle.

Heat the oil in a nonstick frying pan and fry the gorditas in batches for 2-3 minutes, turning halfway through the cooking time, until golden brown.

Drain on kitchen paper. Stir the coriander leaves and parsley through the refried beans, then serve with the gorditas, the aubergine sauce and the salsa.