code: def _sanitize_to_unicode(obj):
          
          if isinstance(obj, dict):
              return dict((BaseGELFHandler._sanitize_to_unicode(k), BaseGELFHandler._sanitize_to_unicode(v)) for k, v in obj.items())
          if isinstance(obj, (list, tuple)):
              return obj.__class__([BaseGELFHandler._sanitize_to_unicode(i) for i in obj])
          if isinstance(obj, data):
              obj = obj.decode('utf-8', errors='replace')
          return obj
docs: Convert all strings records of the object to unicode
  
          :param obj: object to sanitize to unicode.
          :type obj: object
  
          :return: Unicode string representation of the given object.
          :rtype: str