<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def __dump_compose_file(path, compose_result, success_msg, already_existed):
    '''
    Utility function to dump the compose result to a file.

    :param path:
    :param compose_result:
    :param success_msg: the message to give upon success
    :return:
    '''
    ret = __dump_docker_compose(path,
                                compose_result['compose_content'],
                                already_existed)
    if isinstance(ret, dict):
        return ret
    return __standardize_result(True, success_msg,
                                compose_result['compose_content'], None)