code: func makeEventRecorder(kubeDeps *kubelet.Dependencies, nodeName types.NodeName) {
  	if kubeDeps.Recorder != nil {
  		return
  	}
  	eventBroadcaster := record.NewBroadcaster()
  	kubeDeps.Recorder = eventBroadcaster.NewRecorder(legacyscheme.Scheme, v1.EventSource{Component: componentKubelet, Host: string(nodeName)})
  	eventBroadcaster.StartLogging(klog.V(3).Infof)
  	if kubeDeps.EventClient != nil {
  		klog.V(4).Infof("Sending events to api server.")
  		eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeDeps.EventClient.Events("")})
  	} else {
  		klog.Warning("No api server defined - no events will be sent to API server.")
  	}
  }
docs: // makeEventRecorder sets up kubeDeps.Recorder if it's nil. It's a no-op otherwise.