def clean_workspace():
<EOL>result = runner.invoke(dgitmod.profile, ['<STR_LIT>'])<EOL>output = result.output<EOL>output = output.split("<STR_LIT:\n>")<EOL>workspaces = [o.strip() for o in output if "<STR_LIT>" in o]<EOL>if len(workspaces) > <NUM_LIT:0>:<EOL><INDENT>workspace = workspaces[<NUM_LIT:0>]<EOL>workspace = workspace.replace("<STR_LIT>","<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>workspace = os.path.join(os.getcwd(), '<STR_LIT>')<EOL><DEDENT>default_workspace = os.path.expanduser("<STR_LIT>")<EOL>if ((workspace != default_workspace) and<EOL>os.path.exists(workspace)):<EOL><INDENT>print("<STR_LIT>", workspace)<EOL>shutil.rmtree(workspace)<EOL><DEDENT>
Clean the working space