code: func (c *Manager) WaitOnLibraryItemUpdateSession(
  	ctx context.Context, sessionID string,
  	interval time.Duration, intervalCallback func()) error {
  
  	// Wait until the upload operation is complete to return.
  	for {
  		session, err := c.GetLibraryItemUpdateSession(ctx, sessionID)
  		if err != nil {
  			return err
  		}
  		if session.State != "ACTIVE" {
  			return nil
  		}
  		time.Sleep(interval)
  		if intervalCallback != nil {
  			intervalCallback()
  		}
  	}
  }
docs: // WaitOnLibraryItemUpdateSession blocks until the update session is no longer
  // in the ACTIVE state.