code: func (ctl *Controller) initMapper(c context.Context, j *Job, shardIdx int) (Mapper, error) {
  	f, err := ctl.getFactory(j.Config.Mapper)
  	if err != nil {
  		return nil, errors.Annotate(err, "when initializing mapper").Err()
  	}
  	m, err := f(c, j, shardIdx)
  	if err != nil {
  		return nil, errors.Annotate(err, "error from mapper factory %q", j.Config.Mapper).Err()
  	}
  	return m, nil
  }
docs: // initMapper instantiates a Mapper through a registered factory.
  //
  // May return fatal and transient errors.