code: def change_puk(ctx, puk, new_puk):
      
      controller = ctx.obj['controller']
      if not puk:
          puk = _prompt_pin(ctx, prompt='Enter your current PUK')
      if not new_puk:
          new_puk = click.prompt(
              'Enter your new PUK', default='', hide_input=True,
              show_default=False, confirmation_prompt=True,
              err=True)
  
      if not _valid_pin_length(puk):
          ctx.fail('Current PUK must be between 6 and 8 characters long.')
  
      if not _valid_pin_length(new_puk):
          ctx.fail('New PUK must be between 6 and 8 characters long.')
  
      try:
          controller.change_puk(puk, new_puk)
          click.echo('New PUK set.')
  
      except AuthenticationBlocked as e:
          logger.debug('PUK is blocked.', exc_info=e)
          ctx.fail('PUK is blocked.')
  
      except WrongPuk as e:
          logger.debug(
              'Failed to change PUK, %d tries left', e.tries_left, exc_info=e)
          ctx.fail('PUK change failed - %d tries left.' % e.tries_left)
docs: Change the PUK code.
  
      If the PIN is lost or blocked it can be reset using a PUK.
      The PUK must be between 6 and 8 characters long, and supports any type of
      alphanumeric characters.