def register_key(cls, subcls_key, subcls):
        """
        Registers subclass instance in registry of provided class.
        Uses the subclass key as the key for the registry entry.

        Args:
            cls: The registry class, which is a subclass of BaseRegistry.
            subcls_key: The subclass key to be used for the registry entry.
            subcls: The subclass instance to register in the registry class.
        """
        registry = cls.get_registry()
        registry[subcls_key] = subcls

        Registers subclass instance in registry of provided class.
        Uses the subclass key as the key for the registry entry.

        Args:
            cls: The registry class, which is a subclass of BaseRegistry.
            subcls_key: The subclass key to be used for the registry entry.
            subcls: The subclass instance to register in the registry class.
        
coremltools/optimize/torch/_utils/registry.py