code: def _parse_text(self, text, directory):
          
          text_id, text_metadata = text.id, text
          text_metadata.path = "{directory}/{textgroup}.{work}.{version}.xml".format(
              directory=directory,
              textgroup=text_metadata.urn.textgroup,
              work=text_metadata.urn.work,
              version=text_metadata.urn.version
          )
          if os.path.isfile(text_metadata.path):
              try:
                  text = self.read(text_id, path=text_metadata.path)
                  cites = list()
                  for cite in [c for c in text.citation][::-1]:
                      if len(cites) >= 1:
                          cites.append(self.classes["citation"](
                              xpath=cite.xpath.replace("'", '"'),
                              scope=cite.scope.replace("'", '"'),
                              name=cite.name,
                              child=cites[-1]
                          ))
                      else:
                          cites.append(self.classes["citation"](
                              xpath=cite.xpath.replace("'", '"'),
                              scope=cite.scope.replace("'", '"'),
                              name=cite.name
                          ))
                  del text
                  text_metadata.citation = cites[-1]
                  self.logger.info("%s has been parsed ", text_metadata.path)
                  if not text_metadata.citation.is_set():
                      self.logger.error("%s has no passages", text_metadata.path)
                      return False
                  return True
              except Exception:
                  self.logger.error(
                      "%s does not accept parsing at some level (most probably citation) ",
                      text_metadata.path
                  )
                  return False
          else:
              self.logger.error("%s is not present", text_metadata.path)
              return False
docs: Complete the TextMetadata object with its citation scheme by parsing the original text
  
          :param text: Text Metadata collection
          :type text: XmlCtsTextMetadata
          :param directory: Directory in which the metadata was found and where the text file should be
          :type directory: str
          :returns: True if all went well
          :rtype: bool