<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_dir(path):
 """Create dir with the path :param path: The path to be created :type path: str """

    if os.path.exists(path):
        if not os.path.isdir(path):
            logger.error('%s is not a directory', path)
            sys.exit(1)
        else:  # ignore
            pass
    else:
        os.makedirs(path)
        logger.info('Create dir: %s', path)