code: public void removeCohort(String cohortId, String studyId) {
          // Sanity check
          if (StringUtils.isEmpty(cohortId)) {
              logger.error("Cohort ID {} is null or empty.", cohortId);
              return;
          }
  
          VariantStudyMetadata variantStudyMetadata = getVariantStudyMetadata(studyId);
          if (variantStudyMetadata == null) {
              logger.error("Study not found. Check your study ID: '{}'", studyId);
              return;
          }
          if (variantStudyMetadata.getCohorts() != null) {
              for (int i = 0; i < variantStudyMetadata.getCohorts().size(); i++) {
                  if (cohortId.equals(variantStudyMetadata.getCohorts().get(i).getId())) {
                      variantStudyMetadata.getCohorts().remove(i);
                      return;
                  }
              }
          }
      }
docs: Remove a cohort (from cohort ID) of a given variant study metadata (from study ID).
  
  @param cohortId   Cohort ID
  @param studyId    Study ID