def METHOD_NAME(self,
                     group_key=default_group,
                     module_name=None,
                     module_cls=None,
                     force=False):
    assert isinstance(group_key,
                      str), 'group_key is required and must be str'
    if group_key not in self._modules:
        self._modules[group_key] = dict()
    # Some registered module_cls can be function type.
    # if not inspect.isclass(module_cls):
    #     raise TypeError(f'module is not a class type: {type(module_cls)}')
    if module_name is None:
        module_name = module_cls.__name__
    if module_name in self._modules[group_key] and not force:
        raise KeyError(f'{module_name} is already registered in '
                       f'{self._name}[{group_key}]')
    self._modules[group_key][module_name] = module_cls
    module_cls.group_key = group_key