def METHOD_NAME(segmk, site, dsp, tag, bit, value, invert, is_vector=True):
    tag = "%s.%s%s%s" % (
        dsp, ('Z' if invert else ''), tag, '[%u]' % bit if is_vector else '')
    value = (~value if invert else value)
    value >>= bit
    return segmk.add_site_tag(site, tag, value & 1)