code: def sign_with_privkey(
      digest: bytes,
      privkey: Ed25519PrivateKey,
      global_pubkey: Ed25519PublicPoint,
      nonce: int,
      global_commit: Ed25519PublicPoint,
  ) -> Ed25519Signature:
      
      h = _ed25519.H(privkey)
      a = _ed25519.decodecoord(h)
  
      S = (nonce + _ed25519.Hint(global_commit + global_pubkey + digest) * a) % _ed25519.l
      return Ed25519Signature(_ed25519.encodeint(S))
docs: Create a CoSi signature of `digest` with the supplied private key.
      This function needs to know the global public key and global commitment.