@staticmethod
def _add_tid(xs, x_map, tid):
    """Add tid to the relevant map.
        """
    for x in xs:
        if x in x_map:
            x_map[x].add(tid)
        else:
            x_map[x] = {tid}
