code: function processRetrievedDocument(document, filePrismicMetadata, queryKey, ctx) {
              // add the complete result except for the data fragments
              var result = _.omit(document, 'fragments');
              result.data = {};
  
              // process the data fragments, invoking helpers to make the data more usable
              if (document.fragments != null && Object.keys(document.fragments).length  > 0) {
                  for (var fragmentFullName in document.fragments) {
  
                      // strip the document type from the fragment name
                      var fragmentName = fragmentFullName.substr(fragmentFullName.lastIndexOf('.') + 1);
  
                      var fragment = document.fragments[fragmentFullName];
                      result.data[fragmentName] = processSingleFragment(fragment, ctx, filePrismicMetadata[queryKey]);
                  }
              }
  
              return result;
          }
docs: processes and return single retrieved document