from pathlib import Path


def _set_dir_iol(dir_in, dir_out, dir_log=None):
    """ Set directory name for input, output, and logs.
    """
    dir_in = Path(dir_in)
    dir_out = Path(dir_out)
    if dir_log is None:
        dir_log = dir_out.parent
    else:
        dir_log = Path(dir_log)
    return dir_in, dir_out, dir_log