code: function createCompoundIncludes (
    relationship,
    key,
    fk,
    type,
    includedRelations,
    options
  ) {
    var compoundInclude = makeRelation(type, String(relationship[key]))
  
    if (options && !_.isEmpty(includedRelations)) {
      var defaultModelPath = options.modelPath
      options.modelPath = type
  
      compoundInclude.relationships = parseRelations(
        relationship,
        includedRelations,
        options
      )
  
      options.modelPath = defaultModelPath
    }
  
    // remove the id key since its part of the base compound document, not part of attributes
    delete relationship[key]
    delete relationship[fk]
  
    // The rest of the data goes in the attributes
    compoundInclude.attributes = relationship
  
    return compoundInclude
  }
docs: Creates a compound include object.
  @private
  @memberOf {Serializer}
  @param {Object} relationship
  @param {String} key
  @param {String} fk
  @param {String} type
  @param {Object} includedRelations
  @param {Object} options
  @return {Object}