<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tempdir(*args, **kwargs):
 """A contextmanager to work in an auto-removed temporary directory Arguments are passed through to tempfile.mkdtemp example: """


    d = tempfile.mkdtemp(*args, **kwargs)
    try:
        yield d
    finally:
        shutil.rmtree(d)