def METHOD_NAME(wrapped, instance, args, kwargs):
    lock = wrapped(*args, **kwargs)
    return self.PROFILED_LOCK_CLASS(
        lock, self.recorder, self.tracer, self.nframes, self._capture_sampler, self.endpoint_collection_enabled
    )