code: def coerce_quotes(quotes):
          
          orig, quotes = quotes, str(quotes) if quotes else None
          if quotes not in [None, '"', "'"]:
              raise ValueError("{!r} is not a valid quote type".format(orig))
          return quotes
docs: Coerce a quote type into an acceptable value, or raise an error.