code: def to_array(self):
          
          array = super(KeyboardButton, self).to_array()
          array['text'] = u(self.text)  # py2: type unicode, py3: type str
  
          if self.request_contact is not None:
              array['request_contact'] = bool(self.request_contact)  # type bool
          if self.request_location is not None:
              array['request_location'] = bool(self.request_location)  # type bool
          return array
docs: Serializes this KeyboardButton to a dictionary.
  
          :return: dictionary representation of this object.
          :rtype: dict