you can fold this into the file NodeRenumberer.scala by doing

object NodeRenumberer {
final class Identity extends NodeRenumberer {
def ...
}
}

(e.g., see https://github.com/scala/scala/blob/master/src/library/scala/util/hashing/Hashing.scala for this pattern)