code: func LegacyResourceSchema(r *Resource) *Resource {
  	if r == nil {
  		return nil
  	}
  	// start with a shallow copy
  	newResource := new(Resource)
  	*newResource = *r
  	newResource.Schema = map[string]*Schema{}
  
  	for k, s := range r.Schema {
  		newResource.Schema[k] = LegacySchema(s)
  	}
  
  	return newResource
  }
docs: // LegacyResourceSchema takes a *Resource and returns a deep copy with 0.12 specific
  // features removed. This is used by the shims to get a configschema that
  // directly matches the structure of the schema.Resource.