code: function makeBackgroundRequest(req, appId, moduleName, moduleVersion, moduleInstance, appengine) {
    var escapedAppId = appId.replace(/[:.]/g, '_');
    var token = escapedAppId + '/' + moduleName + '.' + moduleVersion + '.' + moduleInstance;
    var result = {
      appengine: {
        devappserver: req.appengine.devappserver,
        appId: appId,
        moduleName: moduleName,
        moduleVersion: moduleVersion,
        moduleInstance: moduleInstance,
        logBuffer_: appengine.newLogBuffer_()
      }
    };
    if (req.appengine.devappserver) {
      result.appengine.devRequestId = token;
    } else {
      result.appengine.apiTicket = token;
    }
    return result;
  }
docs: Return a background request object.
  
  @param {!object} req request
  @param {!string} appId application id
  @param {!string} moduleName module name
  @param {!string} moduleVersion major module version
  @param {!string} moduleInstance instance id
  @param {!Object} appengine AppEngine instance
  @return {!Object} a request object suitable for making api calls