code: def _materialize(module: torch.nn.Module, device: _DEVICE) -> None:
      """Materialize a module."""
      if not _TORCH_GREATER_EQUAL_2_1:
          raise RuntimeError("recurse=False requires torch 2.1")
      module.to_empty(device=device, recurse=False)  # type: ignore[arg-type]
      if not hasattr(module, "reset_parameters"):
          raise TypeError(
              f"Materialization requires that the `{type(module).__name__}.reset_parameters` method is implemented."
              " This method is used to initialize any children parameters or buffers in this module."
          )
      module.reset_parameters()
  
file_path: pytorch-lightning/src/lightning/fabric/utilities/init.py
imports: import itertools
  from typing import Any, Callable, Dict, Optional, Sequence
  import torch
  from typing_extensions import override
  from lightning.fabric.utilities.imports import _TORCH_GREATER_EQUAL_1_13, _TORCH_GREATER_EQUAL_2_1
  from lightning.fabric.utilities.types import _DEVICE
label_desc: Use image node_id 1 for calling a global function with example usage: _materialize(module, device) without return types