class_docstr: Check, install, and call TLGU.
docstr: Use the work-breaking option.
  TODO: Maybe incorporate this into ``convert_corpus()``
  TODO: Write test for this
docstr_tok: ["Use","the","work-breaking","option",".","TODO",":","Maybe","incorporate","this","into","``","convert_corpus","(",")","``","TODO",":","Write","test","for","this"]
code: def divide_works(self, corpus):
      """Use the work-breaking option.
      TODO: Maybe incorporate this into ``convert_corpus()``
      TODO: Write test for this
  
      """
      if corpus == "tlg":
          orig_dir = make_cltk_path("originals/tlg")
          works_dir = make_cltk_path("grc/text/tlg/individual_works")
          file_prefix = "TLG"
          lat = False
      elif corpus == "phi5":
          orig_dir = make_cltk_path("originals/phi5")
          works_dir = make_cltk_path("lat/text/phi5/individual_works")
          file_prefix = "LAT"
          lat = True  # this is for the optional TLGU argument to convert()
      elif corpus == "phi7":
          raise CLTKException(
              "``phi7`` cannot be divided into individual works."
          )
      else:
          raise CLTKException(
              f"Invalid corpus '{corpus}'. This should never happen."
          )
  
      if not os.path.exists(works_dir):
          os.makedirs(works_dir)
  
      files = os.listdir(orig_dir)
      texts = [
          x
          for x in files
          if x.endswith(".TXT") and x.startswith(file_prefix)
      ]
  
      for file in texts:
          orig_file_path = os.path.join(orig_dir, file)
          new_file_path = os.path.join(works_dir, file)
  
          try:
              self.convert(
                  orig_file_path,
                  new_file_path,
                  divide_works=True,
                  lat=lat,
              )
              logger.info(
                  "Writing files at %s to %s.",
                  orig_file_path,
                  works_dir,
              )
          except Exception as err:
              logger.error("Failed to convert files: %s.", err)
  
file_path: cltk/src/cltk/corpora/grc/tlg/tlgu.py
imports: import os
  import subprocess
  from cltk.core.cltk_logger import logger
  from cltk.core.exceptions import CLTKException
  from cltk.data.fetch import FetchCorpus
  from cltk.utils.file_operations import make_cltk_path
  from cltk.utils.utils import query_yes_no
label_desc: Use image node_id 6 for calling the TLGU obj's underlying member method code with example usage: obj.divide_works(corpus) without return types