code: def register(
      cls: Optional[Any] = None,
      data_cls: Optional[Any] = None,
      group: Optional[str] = None,
      **kwargs: Any,
  ) -> Union[Any, Callable]:
      r"""Registers a class in the global configuration store.
  
      Args:
          cls (Any, optional): The class to register. If set to :obj:`None`, will
              return a decorator. (default: :obj:`None`)
          data_cls (Any, optional): The data class to register. If set to
              :obj:`None`, will dynamically create the data class according to
              :class:`~torch_geometric.config_store.to_dataclass`.
              (default: :obj:`None`)
          group (str, optional): The group in the global configuration store.
              (default: :obj:`None`)
          **kwargs (optional): Additional arguments of
              :class:`~torch_geometric.config_store.to_dataclass`.
      """
      if cls is not None:
          name = cls.__name__
  
          if get_node(cls):
              raise ValueError(
                  f"The class '{name}' is already registered in "
                  "the global configuration store"
              )
  
          if data_cls is None:
              data_cls = to_dataclass(cls, **kwargs)
          elif get_node(data_cls):
              raise ValueError(
                  f"The data class '{data_cls.__name__}' is already registered "
                  f"in the global configuration store"
              )
  
          if not typing.TYPE_CHECKING and WITH_HYDRA:
              get_config_store().store(name, data_cls, group)
              get_node(name)._metadata.orig_type = cls
          else:
              get_config_store().store(name, data_cls, group, cls)
  
          return data_cls
  
      def bounded_register(
          cls: Any,
      ) -> Any:  # Other-wise, return a decorator:
          register(cls=cls, data_cls=data_cls, group=group, **kwargs)
          return cls
  
      return bounded_register
  
file_path: pytorch_geometric/torch_geometric/config_store.py
imports: import copy
  import inspect
  import typing
  from collections import defaultdict
  from dataclasses import dataclass, field, make_dataclass
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
label_desc: Use image node_id 5 for calling a global function with example usage: register(cls, data_cls, group) and returns: bounded_register, data_cls, cls