code: func (ms *Module) maybeRestoreResourceInstanceDeposed(addr addrs.ResourceInstance, key DeposedKey) bool {
  	rs := ms.Resource(addr.Resource)
  	if rs == nil {
  		return false
  	}
  	is := rs.Instance(addr.Key)
  	if is == nil {
  		return false
  	}
  	if is.Current != nil {
  		return false
  	}
  	if len(is.Deposed) == 0 {
  		return false
  	}
  	is.Current = is.Deposed[key]
  	delete(is.Deposed, key)
  	return true
  }
docs: // maybeRestoreResourceInstanceDeposed is the real implementation of
  // SyncState.MaybeRestoreResourceInstanceDeposed.