<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_sdk_dir(self):
 """Try to find the MS SDK from the registry. Return None if failed or the directory does not exist. """

        if not SCons.Util.can_read_reg:
            debug('find_sdk_dir(): can not read registry')
            return None

        hkey = self.HKEY_FMT % self.hkey_data
        debug('find_sdk_dir(): checking registry:{}'.format(hkey))

        try:
            sdk_dir = common.read_reg(hkey)
        except SCons.Util.WinError as e:
            debug('find_sdk_dir(): no SDK registry key {}'.format(repr(hkey)))
            return None

        debug('find_sdk_dir(): Trying SDK Dir: {}'.format(sdk_dir))

        if not os.path.exists(sdk_dir):
            debug('find_sdk_dir():  {} not on file system'.format(sdk_dir))
            return None

        ftc = os.path.join(sdk_dir, self.sanity_check_file)
        if not os.path.exists(ftc):
            debug("find_sdk_dir(): sanity check {} not found".format(ftc))
            return None

        return sdk_dir