'Get a Tag object from a tag name (string).'

def get_tag_by_name(self, tag_name):

    if tag_name:
        return self.sa_session.query(galaxy.model.Tag).filter_by(name=tag_name.lower()).first()
    return None
