code: protected Map<String, String> packACLs(Map<String, AclType> spaceACLs) {
          Set<String> readUserList = new HashSet<>();
          Set<String> writeUserList = new HashSet<>();
          Set<String> readGroupList = new HashSet<>();
          Set<String> writeGroupList = new HashSet<>();
  
          if (null != spaceACLs) {
              for (String key : spaceACLs.keySet()) {
                  AclType acl = spaceACLs.get(key);
                  if (key.startsWith(PROPERTIES_SPACE_ACL_GROUP)) {
                      String groupName =
                          key.substring(PROPERTIES_SPACE_ACL_GROUP.length());
                      if (acl.equals(AclType.READ)) {
                          readGroupList.add(groupName);
                      } else if (acl.equals(AclType.WRITE)) {
                          writeGroupList.add(groupName);
                      }
                  } else if (key.startsWith(PROPERTIES_SPACE_ACL)) {
                      String userName =
                          key.substring(PROPERTIES_SPACE_ACL.length());
                      if (acl.equals(AclType.READ)) {
                          readUserList.add(userName);
                      } else if (acl.equals(AclType.WRITE)) {
                          writeUserList.add(userName);
                      }
                  }
              }
          }
  
          Map<String, String> packedAcls = new HashMap<>();
          includeACL(packedAcls, ACL_USER_READ, readUserList);
          includeACL(packedAcls, ACL_USER_WRITE, writeUserList);
          includeACL(packedAcls, ACL_GROUP_READ, readGroupList);
          includeACL(packedAcls, ACL_GROUP_WRITE, writeGroupList);
  
          return packedAcls;
      }
docs: /*
  Converts ACLs from the input format:
  name= acl-username1
  value= READ
  name= acl-username2
  value= WRITE
  name= acl-username3
  value= WRITE
  
  to packed ACL format:
  name= acl-read
  value= username1
  name= acl-write
  value= username2:username3
  
  Also converts to packed acl-group-read and acl-group-write formats