Creating new LXC template from container or customizing a template

I would like to know if it’s possible to create a LXC template using an existing LXC container as source.

Or, if it’s possible to temporarily mount or run an existing LXC template, making changes to it (not only adding packages, but changing their config files), and then creating a new LXC template from this custom version.

I apologize if this specific scenario has already been discussed, but as I needed more information than what is provided in the Distrobuilder documentation, I started reading Konstantin Ivanov’s book “Containerization with LXC” [link] and will post more details here.