code: def encode(self, value):
          
          if self.decode_responses and isinstance(value, bytes):
              value = value.decode(self.encoding)
          elif not self.decode_responses and isinstance(value, str):
              value = value.encode(self.encoding)
          return value
docs: Encode the value so that it's identical to what we'll
          read off the connection