def METHOD_NAME(
    self,
    func: t.Callable,
    func_name: str,
) -> None:
    from starwhale.api._impl.evaluation import PipelineHandler
    patch_func_map = {
        "predict": lambda *args, **kwargs: ...,
        "evaluate": lambda *args, **kwargs: ...,
    }
    if func_name not in patch_func_map:
        raise RuntimeError(
            f"func_name({func_name}) is not in patch func map:{patch_func_map.keys()}"
        )
    def _pop_self_args_func(f: t.Callable) -> t.Callable:
        @wraps(f)
        def _wrap(*args: t.Any, **kwargs: t.Any) -> t.Any:
            if len(args) >= 1 and isinstance(args[0], PipelineHandler):
                args = args[1:]
            return f(*args, **kwargs)
        return _wrap
    patch_func_map[func_name] = _pop_self_args_func(func)
    cls_ = type(
        "GenericPipelineHandler",
        (PipelineHandler,),
        patch_func_map,
    )
    handler_func_name = self._get_internal_func_name(func_name)
    with cls_(*self.step.extra_args, **self.step.extra_kwargs) as instance:
        getattr(instance, handler_func_name)()