human
Complete the below
def create_tmp_dir(function):

    ''''Creates temporary directory for rsync purposes.
    Removes created directory in the end.'
    '''

Give me a the Python code you requested?
assistant
#Here is the Python code you requested.
    @functools.wraps(function)
    def decorated_function(*args, **kwargs):
        tmp_dir_path = tempfile.mkdtemp()
        kwargs['tmp_dir_path'] = tmp_dir_path
        try:
            return function(*args, **kwargs)
        finally:
            utils.execute('rm', '-rf', tmp_dir_path)
    return decorated_function