docs: def prepare_labels(label_type, org_xml_dir=ORG_XML_DIR, label_dir=LABEL_DIR):
      """ Prepare the neural network output targets."""
  
      if not os.path.exists(os.path.join(label_dir, "TEXT")):
          os.makedirs(os.path.join(label_dir, "TEXT"))
      if not os.path.exists(os.path.join(label_dir, "WORDLIST")):
          os.makedirs(os.path.join(label_dir, "WORDLIST"))
  
      for path in Path(org_xml_dir).glob("*.xml"):
          fn = path.name
          prefix, _ = os.path.splitext(fn)
  
          rec_type, sents, _, _ = pangloss.get_sents_times_and_translations(str(path))
          # Write the sentence transcriptions to file
          sents = [preprocess_na(sent, label_type) for sent in sents]
          for i, sent in enumerate(sents):
              if sent.strip() == "":
                  # Then there's no transcription, so ignore this.
                  continue
              out_fn = "%s.%d.%s" % (prefix, i, label_type)
              sent_path = os.path.join(label_dir, rec_type, out_fn)
              with open(sent_path, "w") as sent_f:
                  print(sent, file=sent_f)