code: 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'f _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']
docs: Handle a grains_refresh event