    def register(
            name: str = None,
            input_schema=None,  # pylint: disable=unused-argument
            output_schema=None, # pylint: disable=unused-argument
            flag=None # pylint: disable=unused-argument
    ):
        """
        Register a class, function, or callable as a towhee operator.

        Args:
            name (str, optional): operator name, will use the class/function name if None.

            input_schema, output_schema, flag for legacy operators.

        Returns:
            [type]: [description]
        """
        if callable(name):
            # the decorator is called directly without any arguments,
            # relaunch the register
            cls = name
            return OperatorRegistry.register()(cls)

        def wrapper(cls):
            nonlocal name
            name = URI(cls.__name__ if name is None else name).resolve_repo('anon')

            if isinstance(cls, types.FunctionType):
                OperatorRegistry.REGISTRY[name + '_func'] = cls

            # wrap a callable to a class
            if not isinstance(cls, type) and callable(cls):
                func = cls
                cls = type(
                    cls.__name__, (object, ), {
                        '__call__': lambda _, *arg, **kws: func(*arg, **kws),
                        '__doc__': func.__doc__,
                    })

            if not hasattr(cls, 'shared_type'):
                cls.shared_type = SharedType.Shareable
            OperatorRegistry.REGISTRY[name] = cls

            return cls

        return wrapper
Register a class, function, or callable as a towhee operator.

Args:
name (str, optional): operator name, will use the class/function name if None.

input_schema, output_schema, flag for legacy operators.

Returns:
[type]: [description]
towhee/runtime/operator_manager/operator_registry.py