def _intersect(self, cmdset_a, cmdset_b):
        cmdset_c = cmdset_a._duplicate()
        if cmdset_a.duplicates and cmdset_a.priority == cmdset_b.priority:
            for cmd in [cmd for cmd in cmdset_a if cmd in cmdset_b]:
                cmdset_c.add(cmd)
                cmdset_c.add(cmdset_b.get(cmd))
        else:
            cmdset_c.commands = [cmd for cmd in cmdset_a if cmd in cmdset_b]
        return cmdset_c
Merge two sets using intersection merger
dataset/ETHPy150Open evennia/evennia/evennia/commands/cmdset.py/CmdSet._intersect