def make_tag(parent_ns, name, dataset, desc, indexed=False):
    """
    Given a parent namespace, name, description and optional indexed flag will
    create and return the resulting tag

    parent_ns - the parent namespace under which the tag will be created

    name - the name of the new tag

    dataset - the title of the dataset that is causing this tag to be created
    (used when setting the description of the new tag)

    desc - the description of the dataset that's causing the tag to be created
    (used when setting the description of the new tag)

    indexed - flag to indicate if the tag is to be indexed for full text
    search
    """
    try:
        logger.info('Creating new tag "%r" under %r' % (name, parent_ns.path))
        tag = parent_ns.create_tag(name, TAG_DESC % (name, dataset, desc), False)
        logger.info('Tag %r created' % tag.path)
    except Fluid412Error:
        # 412 simply means the tag already exists
        tag = Tag(parent_ns.path + '/' + name)
        logger.info('%r already existed' % tag.path)
    return tag
dataset/ETHPy150Open fluidinfo/flimp/flimp/utils.py/make_tag/original