<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def events(self, since=None, until=None, filters=None, decode=None):
 """ Get real-time events from the server. Similar to the ``docker events`` command. Args: since (UTC datetime or int):
 Get events from this point until (UTC datetime or int):
 Get events until this point filters (dict):
 Filter the events by event time, container or image decode (bool):
 If set to true, stream will be decoded into dicts on the fly. False by default. Returns: A :py:class:`docker.types.daemon.CancellableStream` generator Raises: :py:class:`docker.errors.APIError` If the server returns an error. Example: {u'from': u'image/with:tag', u'id': u'container-id', u'status': u'start', u'time': 1423339459} or """


        if isinstance(since, datetime):
            since = utils.datetime_to_timestamp(since)

        if isinstance(until, datetime):
            until = utils.datetime_to_timestamp(until)

        if filters:
            filters = utils.convert_filters(filters)

        params = {
            'since': since,
            'until': until,
            'filters': filters
        }
        url = self._url('/events')

        response = self._get(url, params=params, stream=True, timeout=None)
        stream = self._stream_helper(response, decode=decode)

        return types.CancellableStream(stream, response)