docs: function(mod) {
    // XXX: consider using `Module.parent` and `delete require.cache[module.id]`
    if (!(mod instanceof Module)) {
      throw new TypeError(
        'Module required (e.g., "var __ = require(\'@carbon-io/fibers\').__(module)")')
    }
    var __ = function(f, cb) {
      if (typeof __ensure._getCurrentFiber() === 'undefined') {
        return __spawn(f, cb, _debugLogger.bind(undefined, mod))
      }
      var ret = undefined
      try {
        ret = f()
        if (cb) {
          cb(null, ret)
        }
      } catch (e) {
        // XXX: do we want to log to stderr here? setting mod to undefined for 
        //      now to disable stderr
        _debugLogger(
          undefined, 'Exception caught with cb undefined in __: ' + inspect(e))
        if (cb) {
          cb(e)
        } else {
          throw e
        }
      }
    }
  
    //  __(.main)?
    __.main = function() {
      console.warn('"__.main" is DEPRECATED and no longer necessary')
      return __.apply(undefined, arguments)
    }
  
    //  __(.ensure)*(.main)?
    __.ensure = __
  
    //  __(.(ensure|main))*
    __.main.ensure = __
  
    //  __(.(ensure|main))*(.spawn)?
    __.spawn = __spawn
  
    //  __(.(ensure|main))*(.spawn(.main(.(ensure|main))*)?)?
    __.spawn.main = __.main
  
    //  __(.(ensure|main))*(.spawn(.(ensure|main))*)?
    __.spawn.ensure = __
  
    //  __(.(spawn|ensure|main))*
    __.spawn.spawn = __spawn
  
    return __
  }