finalCompartmentDescriptorTransform = (
  compartmentDescriptor,
  { trustRoot = true, log = defaultLog } = {}
) => {
  /* c8 ignore next */
  if (compartmentDescriptor.name === ATTENUATORS_COMPARTMENT) {
    // should be impossible
    throw new GenerationError(
      `Unexpected attenuator compartment found when computing canonical package name in ${compartmentDescriptor.label} (${compartmentDescriptor.location})`
    )
  }

  const { label } = compartmentDescriptor
  compartmentDescriptor.label = getCanonicalName(
    compartmentDescriptor,
    trustRoot
  )

  log.debug(
    `Replaced compartment label ${hrLabel(label)} with canonical name ${hrLabel(compartmentDescriptor.label)}`
  )
}
This compartment descriptor transform replaces the `label` field of the
compartment descriptor with the canonical name of the package.

We have no use for Endo's own `label` field, which is only used for debugging
and/or display purposes.

It is intended to be executed _last_ in the list of transforms.

@privateRemarks
It may become necessary to keep a mapping from old to new labels in the
future. Why? Because stuff like that keeps being necessary.

We may want to consider adding an option to `mapNodeModules()` which is a
callback to generate the `label` field.
@type {CompartmentDescriptorTransform}