code: func (s *SyncState) ResourceInstanceObject(addr addrs.AbsResourceInstance, gen Generation) *ResourceInstanceObjectSrc {
  	s.lock.RLock()
  	defer s.lock.RUnlock()
  
  	inst := s.state.ResourceInstance(addr)
  	if inst == nil {
  		return nil
  	}
  	return inst.GetGeneration(gen).DeepCopy()
  }
docs: // ResourceInstanceObject returns a snapshot of the current instance object
  // of the given generation belonging to the instance with the given address,
  // or nil if no such object is tracked..
  //
  // The return value is a pointer to a copy of the object, which the caller may
  // then freely access and mutate.