def exists_or_mkdir(path, verbose=True):
if not os.path.exists(path):<EOL><INDENT>if verbose:<EOL><INDENT>logging.info("<STR_LIT>" % path)<EOL><DEDENT>os.makedirs(path)<EOL>return False<EOL><DEDENT>else:<EOL><INDENT>if verbose:<EOL><INDENT>logging.info("<STR_LIT>" % path)<EOL><DEDENT>return True<EOL><DEDENT>
Check a folder by given name, if not exist, create the folder and return False,
    if directory exists, return True.

    Parameters
    ----------
    path : str
        A folder path.
    verbose : boolean
        If True (default), prints results.

    Returns
    --------
    boolean
        True if folder already exist, otherwise, returns False and create the folder.

    Examples
    --------
    >>> tl.files.exists_or_mkdir("checkpoints/train")