code: func (vm *InprocVM) Stop(ccid ccintf.CCID, timeout uint, dontkill bool, dontremove bool) error {
  	path := ccid.GetName()
  
  	ipctemplate := vm.registry.getType(path)
  	if ipctemplate == nil {
  		return fmt.Errorf("%s not registered", path)
  	}
  
  	instName := vm.GetVMName(ccid)
  
  	ipc := vm.registry.getInstance(instName)
  	if ipc == nil {
  		return fmt.Errorf("%s not found", instName)
  	}
  
  	if !ipc.running {
  		return fmt.Errorf("%s not running", instName)
  	}
  
  	ipc.running = false
  	close(ipc.stopChan)
  	vm.registry.removeInstance(instName)
  
  	//TODO stop
  	return nil
  }
docs: //Stop stops a system codechain