<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def statuses_update(self, status, in_reply_to_status_id=None, lat=None, long=None, place_id=None, display_coordinates=None, trim_user=None, media_ids=None):
 """ Posts a tweet. https://dev.twitter.com/docs/api/1.1/post/statuses/update :param str status: (*required*) The text of your tweet, typically up to 140 characters. URL encode as necessary. t.co link wrapping may affect character counts. There are some special commands in this field to be aware of. For instance, preceding a message with "D " or "M " and following it with a screen name can create a direct message to that user if the relationship allows for it. :param str in_reply_to_status_id: The ID of an existing status that the update is in reply to. Note: This parameter will be ignored unless the author of the tweet this parameter references is mentioned within the status text. Therefore, you must include @username, where username is the author of the referenced tweet, within ``status``. :param float lat: The latitude of the location this tweet refers to. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn't a corresponding long parameter. :param float long: The longitude of the location this tweet refers to. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter. :param str place_id: A place in the world. These IDs can be retrieved from GET geo/reverse_geocode. (TODO: Reference method when it exists.) :param bool display_coordinates: Whether or not to put a pin on the exact coordinates a tweet has been sent from. :param bool trim_user: When set to ``True``, the return value's user object includes only the status author's numerical ID. :param list media_ids: A list of images previously uploaded to Twitter (referenced by their ``media_id``) that are to be embedded in the tweet. Maximum of four images. :returns: A tweet dict containing the posted tweet. """

        params = {}
        set_str_param(params, 'status', status)
        set_str_param(params, 'in_reply_to_status_id', in_reply_to_status_id)
        set_float_param(params, 'lat', lat, min=-90, max=90)
        set_float_param(params, 'long', long, min=-180, max=180)
        set_str_param(params, 'place_id', place_id)
        set_bool_param(params, 'display_coordinates', display_coordinates)
        set_bool_param(params, 'trim_user', trim_user)
        set_list_param(params, 'media_ids', media_ids, max_len=4)
        return self._post_api('statuses/update.json', params)