def ustr(s, encoding="utf-8"):
        """ Convert argument to unicode string.
        """
        if isinstance(s, str):
            return s
        try:
            return s.decode(encoding)
        except __HOLE__:
            return str(s)
dataset/ETHPy150Open nigelsmall/httpstream/httpstream/util.py/ustr