code: def finalizenames(self, client, finalimage):
          
          client.api.tag(finalimage, *self.targetname.split(':'))
          cprint('Tagged final image as "%s"' % self.targetname,
                 'green')
          if not self.keepbuildtags:
              print('Untagging intermediate containers:', end='')
              for step in self.steps:
                  client.api.remove_image(step.buildname, force=True)
                  print(step.buildname, end=',')
              print()
docs: Tag the built image with its final name and untag intermediate containers