code: def observe(self, callback, err_callback, duration=60):
          
          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)
docs: Observe resource and call callback when updated.