def makedirs(name, mode=<NUM_LIT>, exist_ok=False):
try:<EOL><INDENT>os.makedirs(name, mode)<EOL><DEDENT>except OSError:<EOL><INDENT>if not os.path.isdir(name) or not exist_ok:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>
Mimicks os.makedirs() from Python 3.