code: public Groups getPublicGroups(String userId, Boolean invitationOnly, boolean sign) throws JinxException {
      JinxUtils.validateParams(userId);
      Map<String, String> params = new TreeMap<>();
      params.put("method", "flickr.people.getPublicGroups");
      params.put("user_id", userId);
      if (invitationOnly != null) {
        params.put("invitation_only", invitationOnly ? "1" : "0");
      }
      return jinx.flickrGet(params, Groups.class, sign);
    }
docs: Returns the list of public groups a user is a member of.
  <br>
  This method does not require authentication.
  
  @param userId         (Required) The userId of the user to fetch groups for.
  @param invitationOnly (Optional) Include public groups that require an invitation or administrator approval to join.
  @param sign           if true, the request will be signed.
  @return object with the public groups the user is a member of.
  @throws JinxException if required parameters are missing, or if there are any errors.
  @see <a href="https://www.flickr.com/services/api/flickr.people.getPublicGroups.html">flickr.people.getPublicGroups</a>