<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setEngineRootOverride(self, rootDir):
 		""" 		Sets a user-specified directory as the root engine directory, overriding any auto-detection 		"""

				
		# Set the new root directory
		ConfigurationManager.setConfigKey('rootDirOverride', os.path.abspath(rootDir))
		
		# Check that the specified directory is valid and warn the user if it is not
		try:
			self.getEngineVersion()
		except:
			print('Warning: the specified directory does not appear to contain a valid version of the Unreal Engine.')