docs: def yubiotp(ctx, slot, public_id, private_id, key, no_enter, force,
              serial_public_id, generate_private_id,
              generate_key):
      """
      Program a Yubico OTP credential.
  
      """
  
      dev = ctx.obj['dev']
      controller = ctx.obj['controller']
  
      if public_id and serial_public_id:
          ctx.fail('Invalid options: --public-id conflicts with '
                   '--serial-public-id.')
  
      if private_id and generate_private_id:
          ctx.fail('Invalid options: --private-id conflicts with '
                   '--generate-public-id.')
  
      if key and generate_key:
          ctx.fail('Invalid options: --key conflicts with --generate-key.')
  
      if not public_id:
          if serial_public_id:
              if dev.serial is None:
                  ctx.fail('Serial number not set, public ID must be provided')
              public_id = modhex_encode(
                  b'\xff\x00' + struct.pack(b'>I', dev.serial))
              click.echo(
                  'Using YubiKey serial as public ID: {}'.format(public_id))
          elif force:
              ctx.fail(
                  'Public ID not given. Please remove the --force flag, or '
                  'add the --serial-public-id flag or --public-id option.')
          else:
              public_id = click.prompt('Enter public ID', err=True)
  
      try:
          public_id = modhex_decode(public_id)
      except KeyError:
          ctx.fail('Invalid public ID, must be modhex.')
  
      if not private_id:
          if generate_private_id:
              private_id = os.urandom(6)
              click.echo(
                  'Using a randomly generated private ID: {}'.format(
                      b2a_hex(private_id).decode('ascii')))
          elif force:
              ctx.fail(
                  'Private ID not given. Please remove the --force flag, or '
                  'add the --generate-private-id flag or --private-id option.')
          else:
              private_id = click.prompt('Enter private ID', err=True)
              private_id = a2b_hex(private_id)
  
      if not key:
          if generate_key:
              key = os.urandom(16)
              click.echo(
                  'Using a randomly generated secret key: {}'.format(
                      b2a_hex(key).decode('ascii')))
          elif force:
              ctx.fail('Secret key not given. Please remove the --force flag, or '
                       'add the --generate-key flag or --key option.')
          else:
              key = click.prompt('Enter secret key', err=True)
              key = a2b_hex(key)
  
      force or click.confirm('Program an OTP credential in slot {}?'.format(slot),
                             abort=True, err=True)
      try:
          controller.program_otp(slot, key, public_id, private_id, not no_enter)
      except YkpersError as e:
          _failed_to_write_msg(ctx, e)