code: func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string, versions []string) error {
  	klog.Infof(log("Register new plugin with name: %s at endpoint: %s", pluginName, endpoint))
  
  	highestSupportedVersion, err := h.validateVersions("RegisterPlugin", pluginName, endpoint, versions)
  	if err != nil {
  		return err
  	}
  
  	// Storing endpoint of newly registered CSI driver into the map, where CSI driver name will be the key
  	// all other CSI components will be able to get the actual socket of CSI drivers by its name.
  	csiDrivers.Set(pluginName, Driver{
  		endpoint:                endpoint,
  		highestSupportedVersion: highestSupportedVersion,
  	})
  
  	// Get node info from the driver.
  	csi, err := newCsiDriverClient(csiDriverName(pluginName))
  	if err != nil {
  		return err
  	}
  
  	ctx, cancel := context.WithTimeout(context.Background(), csiTimeout)
  	defer cancel()
  
  	driverNodeID, maxVolumePerNode, accessibleTopology, err := csi.NodeGetInfo(ctx)
  	if err != nil {
  		if unregErr := unregisterDriver(pluginName); unregErr != nil {
  			klog.Error(log("registrationHandler.RegisterPlugin failed to unregister plugin due to previous error: %v", unregErr))
  		}
  		return err
  	}
  
  	err = nim.InstallCSIDriver(pluginName, driverNodeID, maxVolumePerNode, accessibleTopology)
  	if err != nil {
  		if unregErr := unregisterDriver(pluginName); unregErr != nil {
  			klog.Error(log("registrationHandler.RegisterPlugin failed to unregister plugin due to previous error: %v", unregErr))
  		}
  		return err
  	}
  
  	return nil
  }
docs: // RegisterPlugin is called when a plugin can be registered