code: def unquote_etag(etag):
      
      if not etag:
          return None, None
      etag = etag.strip()
      weak = False
      if etag[:2] in ('w/', 'W/'):
          weak = True
          etag = etag[2:]
      if etag[:1] == etag[-1:] == '"':
          etag = etag[1:-1]
      return etag, weak
docs: Unquote a single etag:
  
      >>> unquote_etag('w/"bar"')
      ('bar', True)
      >>> unquote_etag('"bar"')
      ('bar', False)
  
      :param etag: the etag identifier to unquote.
      :return: a ``(etag, weak)`` tuple.