docs: public Set<MarketplacePortletDefinition> getRandomSamplingRelatedPortlets(final IPerson user) {
  
          Validate.notNull(user, "Cannot filter to BROWSEable by a null user");
  
          final IAuthorizationPrincipal principal =
                  AuthorizationPrincipalHelper.principalFromUser(user);
  
          // lazy init is essential to avoid infinite recursion in graphing related portlets.
          if (this.relatedPortlets == null) {
              this.initRelatedPortlets();
          }
          if (this.relatedPortlets.isEmpty()) {
              return this.relatedPortlets;
          }
  
          List<MarketplacePortletDefinition> tempList =
                  new ArrayList<MarketplacePortletDefinition>(this.relatedPortlets);
          Collections.shuffle(tempList);
          final int count = Math.min(QUANTITY_RELATED_PORTLETS_TO_SHOW, tempList.size());
  
          final Set<MarketplacePortletDefinition> rslt = new HashSet<MarketplacePortletDefinition>();
  
          for (final MarketplacePortletDefinition relatedPortlet : tempList) {
  
              if (marketplaceService.mayBrowsePortlet(principal, relatedPortlet)) {
                  rslt.add(relatedPortlet);
              }
  
              if (rslt.size() >= count) break; // escape the loop if we've hit our target quantity
              // of related portlets
          }
  
          return rslt;
      }