def _setup_cpu_affinity():
    p = psutil.Process()

    if options.cpu_bindings_modulo:
        cpu_bindings = [len(p.cpu_affinity()) % p.pid]
    else:
        cpu_bindings = options.cpu_bindings.split(',')
        cpu_bindings = [int(core) for core in cpu_bindings]
        if not cpu_bindings:
            return

    p.cpu_affinity(cpu_bindings)
    gen_logger.warn('CPU AFFINITY: %s', p.cpu_affinity())
dataset/ETHPy150Open bufferx/twork/twork/tworkd.py/_setup_cpu_affinity/swapped operands of `%`