def METHOD_NAME():
    ''' Get a temporary directory that will be cleaned up after the request is completed
    Returns:
        :obj:`str`: path to temporary directory
    '''
    dirname = tempfile.mkdtemp()
    @flask.after_this_request
    def cleanup(response, dirname=dirname):
        shutil.rmtree(dirname)
        return response
    return dirname