def METHOD_NAME(pipeline_cls, is_cluster, get_command_args_fn):
    # type: (Any, bool, Any) -> None
    old_execute = pipeline_cls.execute
    def sentry_patched_execute(self, *args, **kwargs):
        # type: (Any, *Any, **Any) -> Any
        hub = Hub.current
        if hub.get_integration(RedisIntegration) is None:
            return old_execute(self, *args, **kwargs)
        with hub.start_span(
            op=OP.DB_REDIS, description="redis.pipeline.execute"
        ) as span:
            with capture_internal_exceptions():
                _set_pipeline_data(
                    span,
                    is_cluster,
                    get_command_args_fn,
                    self.transaction,
                    self.command_stack,
                )
                span.set_data(SPANDATA.DB_SYSTEM, "redis")
            return old_execute(self, *args, **kwargs)
    pipeline_cls.execute = sentry_patched_execute