code: func (m *Meta) initDirFromModule(targetDir string, addr string, hooks initwd.ModuleInstallHooks) tfdiags.Diagnostics {
  	var diags tfdiags.Diagnostics
  	targetDir = m.normalizePath(targetDir)
  	moreDiags := initwd.DirFromModule(targetDir, m.modulesDir(), addr, m.registryClient(), hooks)
  	diags = diags.Append(moreDiags)
  	return diags
  }
docs: // initDirFromModule initializes the given directory (which should be
  // pre-verified as empty by the caller) by copying the source code from the
  // given module address.
  //
  // Internally this runs similar steps to installModules.
  // The given hooks object will be notified of installation progress, which
  // can then be relayed to the end-user. The moduleUiInstallHooks type in
  // this package has a reasonable implementation for displaying notifications
  // via a provided cli.Ui.