code: def get_data_module(
      name: str, **kwargs: Any
  ) -> pl.LightningDataModule:
      """
      This method creates the data module with the specified name. The provided
      keyword arguments must contain ALL arguments required by the model configuration.
      Superfluous arguments may be provided and are simply ignored.
  
      Parameters
      ----------
      name: str
          The canonical name of the data module. See `DATA_MODULE_REGISTRY`.
      kwargs: Any
          Keyword arguments passed to the initializer of the data module.
  
      Returns
      -------
      ModelConfig
          The data module.
      """
      if name in DATA_MODULE_REGISTRY:
          dm_module_cls = DATA_MODULE_REGISTRY[name]
      elif name.startswith("dm_m4"):
          dm_module_cls = DATA_MODULE_REGISTRY["dm_m4"]
      elif name.startswith("dm_m3"):
          dm_module_cls = DATA_MODULE_REGISTRY["dm_m3"]
      elif name.startswith("dm_m1"):
          dm_module_cls = DATA_MODULE_REGISTRY["dm_m1"]
      elif name[3:] in dataset_recipes.keys():
          dm_module_cls = DATA_MODULE_REGISTRY["dm_gluonts"]
      else:
          print(f"Data module name {name} is unknown.")
  
      return dm_module_cls(**kwargs)
  
imports: from typing import Dict, Type, TypeVar, Any
  import pytorch_lightning
  from gluonts.dataset.repository.datasets import dataset_recipes
label_desc: Use image node_id 2 for calling a global function with example usage: get_data_module(name) and returns: dm_module_cls