docs: def _update_quoting_state(self, ch):
          """
          Update self.quotes and self.escaped
  
          :param ch: str, current character
          :return: ch if it was not used to update quoting state, else ''
          """
  
          # Set whether the next character is escaped
          # Unquoted:
          #   a backslash escapes the next character
          # Double-quoted:
          #   a backslash escapes the next character only if it is a double-quote
          # Single-quoted:
          #   a backslash is not special
          is_escaped = self.escaped
          self.escaped = (not self.escaped and
                          ch == '\\' and
                          self.quotes != self.SQUOTE)
          if self.escaped:
              return ''
  
          if is_escaped:
              if self.quotes == self.DQUOTE:
                  if ch == '"':
                      return ch
                  return "{0}{1}".format('\\', ch)
  
              return ch
  
          if self.quotes is None:
              if ch in (self.SQUOTE, self.DQUOTE):
                  self.quotes = ch
                  return ''
  
          elif self.quotes == ch:
              self.quotes = None
              return ''
  
          return ch