def _get_tag_patterns(self, tags):
    return (TagPatterns(tags) if (not isinstance(tags, TagPatterns)) else tags)
def _get_tag_patterns(self, tags):
    return (TagPatterns(tags) if (not isinstance(tags, TagPatterns)) else tags)