code: def to_unicode(value):
      """Converts a string argument to a unicode string.
  
      If the argument is already a unicode string or None, it is returned
      unchanged.  Otherwise it must be a byte string and is decoded as utf8.
      """
      if isinstance(value, _TO_UNICODE_TYPES):
          return value
      if not isinstance(value, bytes):
          raise TypeError(
              "Expected bytes, unicode, or None; got %r" % type(value)
          )
      return value.decode("utf-8")
  
file_path: catboost/contrib/python/tornado/tornado-4/tornado/escape.py
imports: from __future__ import absolute_import, division, print_function
  import json
  import re
  from tornado.util import PY3, unicode_type, basestring_type
label_desc: Use image node_id 8 for calling a global function with example usage: to_unicode(value) and returns: value, value