Working with multiple Nest version - JsonNetSerializer doesn't exist in Nest6

Hello Team,
We are working on upgrading our Elastic from 5.x to the latest.
Currently, we are working against them both (as a rollout process). I'm trying to use multiple Nest versions as guided here: https://www.elastic.co/blog/nest-and-elasticsearch-net-upgrading-your-codebase, but I have a problem using the JsonNetSerializer and JsonSerializerSettings as they do not exist under Nest6 or under Elasticsearch.Net6. Is there any Idea how we can deal with it?
This is the code I'm trying but doesn't compile:

Elasticsearch.Net6.SingleNodeConnectionPool pool = new Elasticsearch.Net6.SingleNodeConnectionPool(new Uri(url));

            Nest6.ConnectionSettings connectionSettings = new Nest6.ConnectionSettings(
              pool,
              sourceSerializer: (builtin, settings) =>
                  new JsonNetSerializer(
                      builtin,
                      settings,
                      () => new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore })
            );

Thanks!