code: def __bytes_to_share_data(self, payload):
          
          rbytes = payload[P_DATA]
          mime = payload[P_MIME]
  
          if mime is None or not self.__auto_encode_decode:
              return rbytes, mime
          mime = expand_idx_mimetype(mime).lower()
          try:
              if mime == 'application/ubjson':
                  return ubjloadb(rbytes), None
              elif mime == 'text/plain; charset=utf8':
                  return rbytes.decode('utf-8'), None
              else:
                  return rbytes, mime
          except:
              logger.warning('auto-decode failed, returning bytes', exc_info=DEBUG_ENABLED)
              return rbytes, mime
docs: Attempt to auto-decode data