code: def sync_resources():
      
      print("Syncing resources with Lastuser...")
      resources = manager.app.lastuser.sync_resources()['results']
  
      for rname, resource in six.iteritems(resources):
          if resource['status'] == 'error':
              print("Error for %s: %s" % (rname, resource['error']))
          else:
              print("Resource %s %s..." % (rname, resource['status']))
              for aname, action in six.iteritems(resource['actions']):
                  if action['status'] == 'error':
                      print("\tError for %s/%s: %s" % (rname, aname, action['error']))
                  else:
                      print("\tAction %s/%s %s..." % (rname, aname, resource['status']))
      print("Resources synced...")
docs: Sync the client's resources with the Lastuser server