code: def register(self, name: str, class_: Type[T]) -> None:
      reg_class = self.registry.setdefault(name, class_)
      if reg_class is not class_:
          raise RuntimeError(
              f"Attempting to re-register {name} "
              f"which was already set to {reg_class!r}"
          )
  
file_path: PyTorch-BigGraph/torchbiggraph/plugin.py
imports: from typing import Callable, Dict, Generic, Type, TypeVar
  from urllib.parse import urlparse
label_desc: Use image node_id 2 for calling the PluginRegistry obj's underlying member method code with example usage: obj.register(name, class_) without return types