code: func SchemaForCtyContainerType(ty cty.Type) *configschema.NestedBlock {
  	var nesting configschema.NestingMode
  	switch {
  	case ty.IsListType():
  		nesting = configschema.NestingList
  	case ty.IsSetType():
  		nesting = configschema.NestingSet
  	default:
  		panic("unsuitable type")
  	}
  	nested := SchemaForCtyElementType(ty.ElementType())
  	return &configschema.NestedBlock{
  		Nesting: nesting,
  		Block:   *nested,
  	}
  }
docs: // SchemaForCtyContainerType converts a cty list-of-object or set-of-object type
  // into an approximately-equivalent configschema.NestedBlock. If the given type
  // is not of the expected kind then this function will panic.