code: func (n *EvalImportState) Eval(ctx EvalContext) (interface{}, error) {
  	absAddr := n.Addr.Absolute(ctx.Path())
  	provider := *n.Provider
  	var diags tfdiags.Diagnostics
  
  	{
  		// Call pre-import hook
  		err := ctx.Hook(func(h Hook) (HookAction, error) {
  			return h.PreImportState(absAddr, n.ID)
  		})
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	resp := provider.ImportResourceState(providers.ImportResourceStateRequest{
  		TypeName: n.Addr.Resource.Type,
  		ID:       n.ID,
  	})
  	diags = diags.Append(resp.Diagnostics)
  	if diags.HasErrors() {
  		return nil, diags.Err()
  	}
  
  	imported := resp.ImportedResources
  
  	for _, obj := range imported {
  		log.Printf("[TRACE] EvalImportState: import %s %q produced instance object of type %s", absAddr.String(), n.ID, obj.TypeName)
  	}
  
  	if n.Output != nil {
  		*n.Output = imported
  	}
  
  	{
  		// Call post-import hook
  		err := ctx.Hook(func(h Hook) (HookAction, error) {
  			return h.PostImportState(absAddr, imported)
  		})
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	return nil, nil
  }
docs: // TODO: test