human
Complete this python program:
def create_tmp_dir(function):
assistant
#Here is the Python code you requested.

    """Creates temporary directory for rsync purposes.
    Removes created directory in the end.
    """
    @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