def _validate_function(self, func, name):
test_feature = self.data['<STR_LIT>'][<NUM_LIT:0>]<EOL>if not callable(func) or not isinstance(func(test_feature), dict):<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>.format(name))<EOL><DEDENT>
Tests `self.style_function` and `self.highlight_function` to ensure
they are functions returning dictionaries.