def mkdir(filepath):
    """
    Make a directory.

    Should succeed even if it needs to make more than one
    directory and nest subdirectories to do so. Raises an error if the
    directory can't be made. Does not raise an error if the directory
    already exists.

    Parameters
    ----------
    filepath : WRITEME
    """
    try:
        os.makedirs(filepath)
    except __HOLE__:
        if not os.path.isdir(filepath):
            raise
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/utils/serial.py/mkdir