code: function(m1, m2) {
      return this.findById(m1, {
        [pathName]: { $elemMatch: { _id: m2 } },
      })
        .then((doc) => {
          if (!doc) {
            return Promise.reject('Friendship not found');
          }
  
          return doc[pathName][0];
        });
    }
docs: Generate a function to return one side of a friendship between two models
  
  @param Model the extending model
  @param m1 the model or model _id being queried
  @param m2 the model or model _id whose friendship is queried for
  
  @returns a function which will call back with an friendship for m2 on m1
  @api private