function Back(fixtureName, options, nockedFn) {
  if (!Back.fixtures) {
    throw new Error(
      'Back requires nock.back.fixtures to be set\n' +
        'Ex:\n' +
        "\trequire(nock).back.fixtures = '/path/to/fixtures/'",
    )
  }

  if (typeof fixtureName !== 'string') {
    throw new Error('Parameter fixtureName must be a string')
  }

  if (arguments.length === 1) {
    options = {}
  } else if (arguments.length === 2) {
    // If 2nd parameter is a function then `options` has been omitted
    // otherwise `options` haven't been omitted but `nockedFn` was.
    if (typeof options === 'function') {
      nockedFn = options
      options = {}
    }
  }

  _mode.setup()

  const fixture = path.join(Back.fixtures, fixtureName)
  const context = _mode.start(fixture, options)

  const nockDone = function () {
    _mode.finish(fixture, options, context)
  }

  debug('context:', context)
  // If nockedFn is a function then invoke it, otherwise return a promise resolving to nockDone.
  if (typeof nockedFn === 'function') {
    nockedFn.call(context, nockDone)
  } else {
    return Promise.resolve({ nockDone, context })
  }
}
nock the current function with the fixture given

@param {string}   fixtureName  - the name of the fixture, e.x. 'foo.json'
@param {object}   options      - [optional] extra options for nock with, e.x. `{ assert: true }`
@param {function} nockedFn     - [optional] callback function to be executed with the given fixture being loaded;
                                 if defined the function will be called with context `{ scopes: loaded_nocks || [] }`
                                 set as `this` and `nockDone` callback function as first and only parameter;
                                 if not defined a promise resolving to `{nockDone, context}` where `context` is
                                 aforementioned `{ scopes: loaded_nocks || [] }`

List of options:

@param {function} before       - a preprocessing function, gets called before nock.define
@param {function} after        - a postprocessing function, gets called after nock.define
@param {function} afterRecord  - a postprocessing function, gets called after recording. Is passed the array
                                 of scopes recorded and should return the array scopes to save to the fixture
@param {function} recorder     - custom options to pass to the recorder