def load_object(self, obj: Union[str, Callable, Any]):
        """Get obj from user_module if it is string name else return object."""
        if isinstance(obj, str):
            assert self.user_module is not None, "There is no user module to load object from."
            return getattr(self.user_module, obj)
        return obj
Get obj from user_module if it is string name else return object.
olive/common/user_module_loader.py