<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 User to a dictionary. :return: dictionary representation of this object. :rtype: dict """

        array = super(User, self).to_array()
        array['id'] = int(self.id)  # type int
        array['is_bot'] = bool(self.is_bot)  # type bool
        array['first_name'] = u(self.first_name)  # py2: type unicode, py3: type str

        if self.last_name is not None:
            array['last_name'] = u(self.last_name)  # py2: type unicode, py3: type str

        if self.username is not None:
            array['username'] = u(self.username)  # py2: type unicode, py3: type str

        if self.language_code is not None:
            array['language_code'] = u(self.language_code)  # py2: type unicode, py3: type str

        return array