<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_get_acls(self, params):
 """ \x1b[1mNAME\x1b[0m get_acls - Gets ACLs for a given path \x1b[1mSYNOPSIS\x1b[0m get_acls <path> [depth] [ephemerals] \x1b[1mOPTIONS\x1b[0m * depth: -1 is no recursion, 0 is infinite recursion, N > 0 is up to N levels (default: 0) * ephemerals: include ephemerals (default: false) \x1b[1mEXAMPLES\x1b[0m > get_acls /zookeeper [ACL(perms=31, acl_list=['ALL'], id=Id(scheme=u'world', id=u'anyone'))] > get_acls /zookeeper -1 /zookeeper: [ACL(perms=31, acl_list=['ALL'], id=Id(scheme=u'world', id=u'anyone'))] /zookeeper/config: [ACL(perms=31, acl_list=['ALL'], id=Id(scheme=u'world', id=u'anyone'))] /zookeeper/quota: [ACL(perms=31, acl_list=['ALL'], id=Id(scheme=u'world', id=u'anyone'))] """

        def replace(plist, oldv, newv):
            try:
                plist.remove(oldv)
                plist.insert(0, newv)
            except ValueError:
                pass

        for path, acls in self._zk.get_acls_recursive(params.path, params.depth, params.ephemerals):
            replace(acls, READ_ACL_UNSAFE[0], "WORLD_READ")
            replace(acls, OPEN_ACL_UNSAFE[0], "WORLD_ALL")
            self.show_output("%s: %s", path, acls)