code: def generate_rsa_key_pair_bytes(
      comment: str = "dstack",
  ) -> Tuple[bytes, bytes]:
      key = rsa.generate_private_key(
          backend=crypto_default_backend(),
          public_exponent=65537,
          key_size=2048,
      )
      private_bytes = key.private_bytes(
          crypto_serialization.Encoding.PEM,
          crypto_serialization.PrivateFormat.PKCS8,
          crypto_serialization.NoEncryption(),
      )
      public_bytes = key.public_key().public_bytes(
          crypto_serialization.Encoding.OpenSSH,
          crypto_serialization.PublicFormat.OpenSSH,
      )
      public_bytes += f" {comment}\n".encode()
  
      return private_bytes, public_bytes
  
file_path: dstack/src/dstack/_internal/utils/crypto.py
imports: import os
  from pathlib import Path
  from typing import Optional, Tuple
  from cryptography.hazmat.backends import default_backend
  from cryptography.hazmat.primitives import serialization
  from cryptography.hazmat.primitives.asymmetric import rsa
label_desc: Use image node_id 2 for calling a global function with example usage: generate_rsa_key_pair_bytes(comment) and returns: private_bytes,  public_bytes