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

def _grains(host, protocol=None, port=None):
    '''
    Helper function to the grains from the proxied device.
    '''
    username, password = find_credentials(DETAILS['host'])
    ret = __salt__['vsphere.system_info'](host=host,
                                          username=username,
                                          password=password,
                                          protocol=protocol,
                                          port=port)
    GRAINS_CACHE.update(ret)
    return GRAINS_CACHE