code: function(datum, targetType, args, isClass, mod, main) {
      if (datum._ref) {
        return _o(mod)(datum._ref) // XXX is this still in play?
      }
  
      // instantiate object
      var result = this.instantiate(datum, targetType, args, isClass, mod)
  
      // define properties
      this._defineProperties(datum, isClass, result)
  
      if (!isClass) { // only applies to objects not classes
        // initialize
        this._initializeObject(result, args)
        // run main (will only run in right conditions)
        if (main) {
          if (result._main && require.main && (require.main === mod)) { // Only run main if in main module
            this._registerSignalHandlers(result)
            this._runMain(result)
          }
        }
      }
  
      return result
    }
docs: ***************************************************************************
  @method _makeObject
  @description Makes an instance of "targetType" using "datum"
  @param {Object} datum -- An object describing an instance or class
  @param {Object|string} targetType -- The instance type or prototype constructor
  depending on whether we are instantiating an
  object or building a class
  @param {Object} args -- Arguments to pass to the constructor if we are instantiating
  an object
  @param {boolean} isClass -- Whether or not we instantiating an object or creating
  a class
  @param {Object} mod -- The module context that this is being called in (note, this
  is used to determine whether or not to call ``main``)
  @param {boolean} main -- Whether or not main should be called (note, this also depends
  on ``require.main`` and ``mod``)
  @returns {Object|Function}
  @throws {Error}
  @ignore