Using the SDK to copy pieces of one Collection to a new collection

I am working on a project with Postman and the SDK to programmatically take bits and pieces of one Collection and creating a new Collection out of them. We have a large number of tests and want to be able to create new Collections with only a subset of those tests.

(See also: this github issue which we are trying to work around.)

So far I am able to successfully move “Items” from one Collection to a new Collection, but am having difficulty figuring out how to get “Events” and “Variables” to copy over. I don’t want to have to manually initialize the values, as the purpose of this is to be able to entirely automate creation of new Collections for testing. I can extract a PostmanEventList and a PostmanVariableList from the source Collection, but nothing seems to work to “add” them to the new Collection. I just end up with empty Event and Variable sections.

If anyone can point me at some examples, or clarify the use of the SDK, that would be a big help.