Sesquiterpenoid and triterpenoid biosynthesis