code: def is_unicode(value):
      
      python_version = sys.version_info[0]
  
      if python_version == 2:
          return isinstance(value, unicode)
      elif python_version == 3:
          return isinstance(value, str)
      else:
          raise NotImplementedError()
docs: Check if a value is a valid unicode string, compatible with python 2 and python 3
  
      >>> is_unicode(u'foo')
      True
      >>> is_unicode(u'✌')
      True
      >>> is_unicode(b'foo')
      False
      >>> is_unicode(42)
      False
      >>> is_unicode(('abc',))
      False