code: def _meta_to_cpu_placement(
      module: nn.Module,
      root_module: nn.Module,
      name: Optional[str] = None,
  ) -> None:
      if (
          name is not None
          and isinstance(module, QuantEmbeddingBagCollection)
          and module.device.type == "meta"
      ):
          qebc_cpu = QuantEmbeddingBagCollection(
              tables=module.embedding_bag_configs(),
              is_weighted=module.is_weighted(),
              device=torch.device("cpu"),
              output_dtype=module.output_dtype(),
              register_tbes=module.register_tbes,
              row_alignment=module.row_alignment,
          )
          setattr(root_module, name, qebc_cpu)
      elif (
          name is not None
          and isinstance(module, QuantEmbeddingCollection)
          and module.device.type == "meta"
      ):
          qec_cpu = QuantEmbeddingCollection(
              tables=module.embedding_configs(),
              device=torch.device("cpu"),
              need_indices=module.need_indices(),
              output_dtype=module.output_dtype(),
              register_tbes=module.register_tbes,
              row_alignment=module.row_alignment,
          )
          setattr(root_module, name, qec_cpu)
      else:
          for name, submodule in module.named_children():
              _meta_to_cpu_placement(submodule, module, name)
  
file_path: torchrec/torchrec/quant/utils.py
imports: from typing import Optional, Union
  import torch
  from torch import nn
  from torchrec.distributed.model_parallel import DistributedModelParallel
  from torchrec.distributed.quant_embeddingbag import ShardedQuantEmbeddingBagCollection
  from torchrec.quant.embedding_modules import EmbeddingBagCollection, EmbeddingCollection
label_desc: Use image node_id 4 for calling a global function with example usage: _meta_to_cpu_placement(module, root_module, name) without return types