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

def _handle_tag_grains_refresh(self, tag, data):
        '''
        Handle a grains_refresh event
        '''
        if (data.get('force_refresh', False) or
                self.grains_cache != self.opts['grains']):
            self.pillar_refresh(force_refresh=True)
            self.grains_cache = self.opts['grains']