def u(r):
    def f(x):
        if sys.version < '3' and isinstance(x, unicode):
            return x.encode(encoding_type)
        return x

    return list(map(f, r))
dataset/ETHPy150Open jasonlvhit/lunar/lunar/database.py/u/original