code: def to_array(self):
          
          array = super(ChosenInlineResult, self).to_array()
          array['result_id'] = u(self.result_id)  # py2: type unicode, py3: type str
          array['from'] = self.from_peer.to_array()  # type User
          array['query'] = u(self.query)  # py2: type unicode, py3: type str
          if self.location is not None:
              array['location'] = self.location.to_array()  # type Location
          if self.inline_message_id is not None:
              array['inline_message_id'] = u(self.inline_message_id)  # py2: type unicode, py3: type str
          return array
docs: Serializes this ChosenInlineResult to a dictionary.
  
          :return: dictionary representation of this object.
          :rtype: dict