<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def observe(self, callback, err_callback, duration=60):
 """Observe resource and call callback when updated."""

        def observe_callback(value):
            """
            Called when end point is updated.

            Returns a Command.
            """
            self.raw = value
            callback(self)

        return Command('get', self.path, process_result=observe_callback,
                       err_callback=err_callback,
                       observe=True,
                       observe_duration=duration)