code: private List<String> getLabels(GDLParser.HeaderContext header) {
      if (header != null && header.label() != null) {
        return header
          .label()
          .stream()
          .map(RuleContext::getText)
          .map(x -> x.substring(1))
          .collect(Collectors.toList());
      }
      return null;
    }
docs: Returns the element labels from a given header context.
  
  @param header header context
  @return element labels or {@code null} if context was null