def prepare_dir(prefix):
    '\n    Prepare a directory, the directory will be a sub-directory of USER_DATA_DIRECTORY with current timestamp\n    prefixed given prefix as the directory name.\n\n    @param prefix: the directory prefix\n    @return: the meshing/simulation directory full path\n    @raise TypeError: if any input parameter is not of required type\n    @raise ValueError: if any input parameter is None/empty\n    @raise ServiceError: if any error occurred when preparing the directory\n    '
    signature = (__name__ + '.prepare_dir()')
    helper.log_entrance(_LOGGER, signature, {'prefix': prefix})
    helper.check_not_none_nor_empty(prefix, 'prefix')
    try:
        run_dir = os.path.join(USER_DATA_DIRECTORY, (((prefix + time.strftime('%Y%m%d%H%M%S')) + '_') + uuid.uuid1().hex))
        os.makedirs(run_dir)
        helper.log_exit(_LOGGER, signature, [run_dir])
        return run_dir
    except Exception as e:
        helper.log_exception(_LOGGER, signature, e)
        raise ServiceError(('Error occurs when preparing the directory. Caused by:\n' + unicode(str(e))))
Prepare a directory, the directory will be a sub-directory of USER_DATA_DIRECTORY with current timestamp
prefixed given prefix as the directory name.

@param prefix: the directory prefix
@return: the meshing/simulation directory full path
@raise TypeError: if any input parameter is not of required type
@raise ValueError: if any input parameter is None/empty
@raise ServiceError: if any error occurred when preparing the directory
def prepare_dir(prefix):
    '\n    Prepare a directory, the directory will be a sub-directory of USER_DATA_DIRECTORY with current timestamp\n    prefixed given prefix as the directory name.\n\n    @param prefix: the directory prefix\n    @return: the meshing/simulation directory full path\n    @raise TypeError: if any input parameter is not of required type\n    @raise ValueError: if any input parameter is None/empty\n    @raise ServiceError: if any error occurred when preparing the directory\n    '
    signature = (__name__ + '.prepare_dir()')
    helper.log_entrance(_LOGGER, signature, {'prefix': prefix})
    helper.check_not_none_nor_empty(prefix, 'prefix')
    try:
        run_dir = os.path.join(USER_DATA_DIRECTORY, (((prefix + time.strftime('%Y%m%d%H%M%S')) + '_') + uuid.uuid1().hex))
        os.makedirs(run_dir)
        helper.log_exit(_LOGGER, signature, [run_dir])
        return run_dir
    except Exception as e:
        helper.log_exception(_LOGGER, signature, e)
        raise ServiceError(('Error occurs when preparing the directory. Caused by:\n' + unicode(str(e))))