code: func makeConstructor(
  	tpt interface{},
  	tptType reflect.Type,
  	argTypes map[reflect.Type]constructor,
  ) (func(host.Host, *tptu.Upgrader) (interface{}, error), error) {
  	v := reflect.ValueOf(tpt)
  	// avoid panicing on nil/zero value.
  	if v == (reflect.Value{}) {
  		return nil, fmt.Errorf("expected a transport or transport constructor, got a %T", tpt)
  	}
  	t := v.Type()
  	if t.Kind() != reflect.Func {
  		return nil, fmt.Errorf("expected a transport or transport constructor, got a %T", tpt)
  	}
  
  	if err := checkReturnType(t, tptType); err != nil {
  		return nil, err
  	}
  
  	argConstructors, err := makeArgumentConstructors(t, argTypes)
  	if err != nil {
  		return nil, err
  	}
  
  	return func(h host.Host, u *tptu.Upgrader) (interface{}, error) {
  		arguments := make([]reflect.Value, len(argConstructors))
  		for i, makeArg := range argConstructors {
  			arguments[i] = reflect.ValueOf(makeArg(h, u))
  		}
  		return callConstructor(v, arguments)
  	}, nil
  }
docs: // makes a transport constructor.