code: func State(opts *StateOpts) string {
  	if opts.Color == nil {
  		panic("colorize not given")
  	}
  
  	if opts.Schemas == nil {
  		panic("schemas not given")
  	}
  
  	s := opts.State
  	if len(s.Modules) == 0 {
  		return "The state file is empty. No resources are represented."
  	}
  
  	buf := bytes.NewBufferString("[reset]")
  	p := blockBodyDiffPrinter{
  		buf:    buf,
  		color:  opts.Color,
  		action: plans.NoOp,
  	}
  
  	// Format all the modules
  	for _, m := range s.Modules {
  		formatStateModule(p, m, opts.Schemas)
  	}
  
  	// Write the outputs for the root module
  	m := s.RootModule()
  
  	if m.OutputValues != nil {
  		if len(m.OutputValues) > 0 {
  			p.buf.WriteString("Outputs:\n\n")
  		}
  
  		// Sort the outputs
  		ks := make([]string, 0, len(m.OutputValues))
  		for k := range m.OutputValues {
  			ks = append(ks, k)
  		}
  		sort.Strings(ks)
  
  		// Output each output k/v pair
  		for _, k := range ks {
  			v := m.OutputValues[k]
  			p.buf.WriteString(fmt.Sprintf("%s = ", k))
  			p.writeValue(v.Value, plans.NoOp, 0)
  			p.buf.WriteString("\n\n")
  		}
  	}
  
  	return opts.Color.Color(strings.TrimSpace(p.buf.String()))
  
  }
docs: // State takes a state and returns a string