code: def normalize_middle_english(text, to_lower=True, alpha_conv=True, punct=True):
      
  
      if to_lower:
          text = text.lower()
  
      if alpha_conv:
          text = text.replace("æ", "ae").replace("þ", "th").replace("ð", "th")
          text = re.sub(r'(?<!\w)(?=\w)ȝ', 'y', text)
          text = text.replace("ȝ", "gh")
  
      if punct:
          text = re.sub(r"[\.\";\,\:\[\]\(\)!&?‘]", "", text)
  
      return text
docs: :param text: str text to be normalized
      :param to_lower: bool convert text to lower text
  
      >>> normalize_middle_english('Whan Phebus in the CraBbe had neRe hys cours ronne', to_lower = True)
      'whan phebus in the crabbe had nere hys cours ronne'
  
      :param alpha_conv: bool convert text to canonical form æ -> ae, þ -> th, ð -> th, ȝ -> y if at beginning,
       gh otherwise
  
      >>> normalize_middle_english('I pray ȝow þat ȝe woll', alpha_conv = True)
      'i pray yow that ye woll'
  
      :param punct: remove punctuation
  
      >>> normalize_middle_english("furst, to begynne:...", punct = True)
      'furst to begynne'
  
      :return: