<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def register_listener(self, listener, reading=False):
 """Add a callback function that is called when sensor value is updated. The callback footprint is received_timestamp, timestamp, status, value. Parameters listener : function Callback signature: if reading listener(katcp_sensor, reading) where `katcp_sensor` is this KATCPSensor instance `reading` is an instance of :class:`KATCPSensorReading` Callback signature: default, if not reading listener(received_timestamp, timestamp, status, value) """

        listener_id = hashable_identity(listener)
        self._listeners[listener_id] = (listener, reading)
        logger.debug(
                    'Register listener for {}'
                    .format(self.name))