<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _winreg_getShellFolder( name ):
 """Get a shell folder by string name from the registry"""

    k = _winreg.OpenKey(
        _winreg.HKEY_CURRENT_USER,
        r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
    )
    try:
        # should check that it's valid? How?
        return _winreg.QueryValueEx( k, name )[0]
    finally:
        _winreg.CloseKey( k )