code: func (s *PrivateAccountAPI) SignTransaction(ctx context.Context, args SendTxArgs, passwd string) (*SignTransactionResult, error) {
  	// No need to obtain the noncelock mutex, since we won't be sending this
  	// tx into the transaction pool, but right back to the user
  	if args.Gas == nil {
  		return nil, fmt.Errorf("gas not specified")
  	}
  	if args.GasPrice == nil {
  		return nil, fmt.Errorf("gasPrice not specified")
  	}
  	if args.Nonce == nil {
  		return nil, fmt.Errorf("nonce not specified")
  	}
  	signed, err := s.signTransaction(ctx, &args, passwd)
  	if err != nil {
  		log.Warn("Failed transaction sign attempt", "from", args.From, "to", args.To, "value", args.Value.ToInt(), "err", err)
  		return nil, err
  	}
  	data, err := rlp.EncodeToBytes(signed)
  	if err != nil {
  		return nil, err
  	}
  	return &SignTransactionResult{data, signed}, nil
  }
docs: // SignTransaction will create a transaction from the given arguments and
  // tries to sign it with the key associated with args.To. If the given passwd isn't
  // able to decrypt the key it fails. The transaction is returned in RLP-form, not broadcast
  // to other nodes