docs: def generate_certificate_signing_request(
          ctx, slot, pin, public_key, csr_output, subject):
      """
      Generate a Certificate Signing Request (CSR).
  
      A private key need to exist in the slot.
  
      \b
      SLOT        PIV slot where the private key is stored.
      PUBLIC-KEY  File containing a public key. Use '-' to use stdin.
      CSR         File to write CSR to. Use '-' to use stdout.
      """
      controller = ctx.obj['controller']
      _verify_pin(ctx, controller, pin)
  
      data = public_key.read()
      public_key = serialization.load_pem_public_key(
          data, default_backend())
  
      try:
          csr = controller.generate_certificate_signing_request(
              slot, public_key, subject, touch_callback=prompt_for_touch)
      except APDUError:
          ctx.fail('Certificate Signing Request generation failed.')
  
      csr_output.write(csr.public_bytes(encoding=serialization.Encoding.PEM))