code: public static List<String> getSampleNames(VariantStudyMetadata variantStudyMetadata) {
          if (variantStudyMetadata == null) {
              return null;
          }
  
          List<String> sampleNames = new ArrayList<>();
          if (variantStudyMetadata.getIndividuals() != null) {
              for (org.opencb.biodata.models.metadata.Individual individual : variantStudyMetadata.getIndividuals()) {
                  for (Sample sample : individual.getSamples()) {
                      if (!StringUtils.isEmpty(sample.getId())) {
                          sampleNames.add(sample.getId());
                      }
                  }
              }
          }
          return sampleNames;
      }
docs: Get sample names form a variant study metadata.
  
  @param variantStudyMetadata  Variant study metadata target
  @return                      List of sample names