code: def _validate_function(self, func, name):
          
          test_feature = self.data['features'][0]
          if not callable(func) or not isinstance(func(test_feature), dict):
              raise ValueError('{} should be a function that accepts items from '
                               'data[\'features\'] and returns a dictionary.'
                               .format(name))
docs: Tests `self.style_function` and `self.highlight_function` to ensure
          they are functions returning dictionaries.