code: public Role getOrCreateRole(JsonNode data) {
          long id = Long.parseLong(data.get("id").asText());
          synchronized (this) {
              return getRoleById(id).orElseGet(() -> {
                  Role role = new RoleImpl(api, this, data);
                  this.roles.put(role.getId(), role);
                  return role;
              });
          }
      }
docs: Gets or create a new role.
  
  @param data The json data of the role.
  @return The role.