code: func LegacySchema(s *Schema) *Schema {
  	if s == nil {
  		return nil
  	}
  	// start with a shallow copy
  	newSchema := new(Schema)
  	*newSchema = *s
  	newSchema.SkipCoreTypeCheck = false
  
  	switch e := newSchema.Elem.(type) {
  	case *Schema:
  		newSchema.Elem = LegacySchema(e)
  	case *Resource:
  		newSchema.Elem = LegacyResourceSchema(e)
  	}
  
  	return newSchema
  }
docs: // LegacySchema takes a *Schema and returns a deep copy with some 0.12-specific
  // features disabled. This is used by the shims to get a configschema that
  // better reflects the given schema.Resource, without any adjustments we
  // make for when sending a schema to Terraform Core.