'Get or create a Tag object from a tag string.'

def _get_or_create_tag(self, tag_str):

    scrubbed_tag_str = self._scrub_tag_name(tag_str)
    if (not scrubbed_tag_str):
        return None
    tag = self.get_tag_by_name(scrubbed_tag_str)
    if (tag is None):
        tag = self._create_tag(scrubbed_tag_str)
    return tag
