<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_device_grain(name, proxy=None):
    '''
    Retrieves device-specific grains.
    '''
    device = _retrieve_device_cache(proxy=proxy)
    return device.get(name.upper())