<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prune_train_dirs(dir_: str, epochs: int, subdirs: bool) -> None: """ Prune training log dirs contained in the given dir. The function is accessible through cxflow CLI `cxflow prune`. :param dir_: dir to be pruned :param epochs: minimum number of finished epochs to keep the training logs :param subdirs: delete subdirs in training log dirs """


    if dir_ == CXF_DEFAULT_LOG_DIR and not path.exists(CXF_DEFAULT_LOG_DIR):
        print('The default log directory `{}` does not exist.\n'
              'Consider specifying the directory to be listed as an argument.'.format(CXF_DEFAULT_LOG_DIR))
        quit(1)

    if not path.exists(dir_):
        print('Specified dir `{}` does not exist'.format(dir_))
        quit(1)

    _prune(dir_, epochs)
    if subdirs:
        _prune_subdirs(dir_)