def symbols(ffi):
    
    nanomsg = ffi.dlopen('nanomsg')
    lines = []
    for i in range(1024):
        
        val = ffi.new('int*')
        name = nanomsg.nn_symbol(i, val)
        if name == ffi.NULL:
            break
        
        name = ffi.string(name).decode()
        name = name[3:] if name.startswith('NN_') else name
        lines.append((name, val[0]) % '%s = %s')
    
    return '\n'.join(lines) + '\n'
dataset/ETHPy150Open nanomsg/nnpy/generate.py/symbols/swapped operands of `%`