def _matches_prefix_or_glob_option(self, option_name, name):
for option in self.config.getini(option_name):<EOL><INDENT>if name.startswith(option):<EOL><INDENT>return True<EOL><DEDENT>elif ("<STR_LIT:*>" in option or "<STR_LIT:?>" in option or "<STR_LIT:[>" in option) and fnmatch.fnmatch(<EOL>name, option<EOL>):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
checks if the given name matches the prefix or glob-pattern defined
in ini configuration.