You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Pharmacy

Context:
In Japan, at the end of the Asuka period (538–710) and the early Nara period (710–794), the men who fulfilled roles similar to those of modern pharmacists were highly respected. The place of pharmacists in society was expressly defined in the Taihō Code (701) and re-stated in the Yōrō Code (718). Ranked positions in the pre-Heian Imperial court were established; and this organizational structure remained largely intact until the Meiji Restoration (1868). In this highly stable hierarchy, the pharmacists—and even pharmacist assistants—were assigned status superior to all others in health-related fields such as physicians and acupuncturists. In the Imperial household, the pharmacist was even ranked above the two personal physicians of the Emperor.

Question:
In which two codes were the roles of pharmacists codified?

the Taihō Code (701) and re-stated in the Yōrō Code (718)