docs: Map<String, Object> gatherModelAttributes(
              String viewName,
              HttpServletRequest req,
              HttpServletResponse res,
              PortalRequest portalRequest,
              Bearer bearer,
              Preferences preferences,
              Definition definition) {
  
          final Map<String, Object> rslt = new HashMap<>();
  
          logger.debug("Processing model attributes for viewName='{}'", viewName);
  
          for (Map.Entry<AnnotatedElement, Object> y : modelAttributes.entrySet()) {
              final AnnotatedElement annotatedElement = y.getKey();
              final Object bean = y.getValue();
              final SoffitModelAttribute sma =
                      annotatedElement.getAnnotation(SoffitModelAttribute.class);
              if (attributeAppliesToView(sma, viewName)) {
                  logger.debug(
                          "The following  SoffitModelAttribute applies to viewName='{}':  {}",
                          viewName,
                          sma);
                  final String modelAttributeName = sma.value();
                  // Are we looking at a class or a method?
                  if (annotatedElement instanceof Class) {
                      // The bean itself is the model attribute
                      rslt.put(modelAttributeName, bean);
                  } else if (annotatedElement instanceof Method) {
                      final Method m = (Method) annotatedElement;
                      final Object modelAttribute =
                              getModelAttributeFromMethod(
                                      bean,
                                      m,
                                      req,
                                      res,
                                      portalRequest,
                                      bearer,
                                      preferences,
                                      definition);
                      rslt.put(modelAttributeName, modelAttribute);
                  } else {
                      final String msg =
                              "Unsupported AnnotatedElement type:  "
                                      + AnnotatedElement.class.getName();
                      throw new UnsupportedOperationException(msg);
                  }
              }
          }
  
          logger.debug(
                  "Calculated the following model attributes for viewName='{}':  {}", viewName, rslt);
  
          return rslt;
      }