<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_array(self):
 """ Serializes this InlineQuery to a dictionary. :return: dictionary representation of this object. :rtype: dict """

        array = super(InlineQuery, self).to_array()
        array['id'] = u(self.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
        array['offset'] = u(self.offset)  # py2: type unicode, py3: type str
        if self.location is not None:
            array['location'] = self.location.to_array()  # type Location
        return array