code: func couldHaveUnknownBlockPlaceholder(v cty.Value, blockS *configschema.NestedBlock, nested bool) bool {
  	switch blockS.Nesting {
  	case configschema.NestingSingle, configschema.NestingGroup:
  		if nested && v.IsNull() {
  			return true // for nested blocks, a single block being unset doesn't disqualify from being an unknown block placeholder
  		}
  		return couldBeUnknownBlockPlaceholderElement(v, &blockS.Block)
  	default:
  		// These situations should be impossible for correct providers, but
  		// we permit the legacy SDK to produce some incorrect outcomes
  		// for compatibility with its existing logic, and so we must be
  		// tolerant here.
  		if !v.IsKnown() {
  			return true
  		}
  		if v.IsNull() {
  			return false // treated as if the list were empty, so we would see zero iterations below
  		}
  
  		// For all other nesting modes, our value should be something iterable.
  		for it := v.ElementIterator(); it.Next(); {
  			_, ev := it.Element()
  			if couldBeUnknownBlockPlaceholderElement(ev, &blockS.Block) {
  				return true
  			}
  		}
  
  		// Our default changes depending on whether we're testing the candidate
  		// block itself or something nested inside of it: zero blocks of a type
  		// can never contain a dynamic block placeholder, but a dynamic block
  		// placeholder might contain zero blocks of one of its own nested block
  		// types, if none were set in the config at all.
  		return nested
  	}
  }
docs: // couldHaveUnknownBlockPlaceholder is a heuristic that recognizes how the
  // HCL dynamic block extension behaves when it's asked to expand a block whose
  // for_each argument is unknown. In such cases, it generates a single placeholder
  // block with all leaf attribute values unknown, and once the for_each
  // expression becomes known the placeholder may be replaced with any number
  // of blocks, so object compatibility checks would need to be more liberal.
  //
  // Set "nested" if testing a block that is nested inside a candidate block
  // placeholder; this changes the interpretation of there being no blocks of
  // a type to allow for there being zero nested blocks.