register_wrapper :param wrapper: A wrapper. :param cls_or_obj: A class or class name or object instance.
(wrapper, cls_or_obj, module_path=None)
| 874 | |
| 875 | |
| 876 | def register_wrapper(wrapper, cls_or_obj, module_path=None): |
| 877 | """register_wrapper |
| 878 | |
| 879 | :param wrapper: A wrapper. |
| 880 | :param cls_or_obj: A class or class name or object instance. |
| 881 | """ |
| 882 | if isinstance(cls_or_obj, str): |
| 883 | module = get_module_by_module_path(module_path) |
| 884 | cls_or_obj = getattr(module, cls_or_obj) |
| 885 | obj = cls_or_obj() if isinstance(cls_or_obj, type) else cls_or_obj |
| 886 | wrapper.register(obj) |
| 887 | |
| 888 | |
| 889 | def load_dataset(path_or_obj, index_col=[0, 1]): |
no test coverage detected