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

        Args:
            cls: The registry class, which is a subclass of BaseRegistry.
            subcls: The subclass instance to register in the registry class.
        """

        registry = cls.get_registry()
        # Syntax is needed because cannot look up __name__ from class instance
        registry[subcls.__class__.__name__] = subcls

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

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