parameters: (etag, weak=False)
return_statement: return etag
docstring: Quote an etag.
  
      :param etag: the etag to quote.
      :param weak: set to `True` to tag it "weak".
docstring_summary: Quote an etag.
docstring_tokens: Quote an etag .
function: def quote_etag(etag, weak=False):
      """Quote an etag.
  
      :param etag: the etag to quote.
      :param weak: set to `True` to tag it "weak".
      """
      if '"' in etag:
          raise ValueError("invalid etag")
      etag = '"%s"' % etag
      if weak:
          etag = "W/" + etag
      return etag
function_tokens: def quote_etag ( etag , weak = False ) : if '"' in etag : raise ValueError ( "invalid etag" ) etag = '"%s"' % etag if weak : etag = "W/" + etag return etag