code: func (s *PublicTransactionPoolAPI) sign(addr common.Address, tx *types.Transaction) (*types.Transaction, error) {
  	// Look up the wallet containing the requested signer
  	account := accounts.Account{Address: addr}
  
  	wallet, err := s.b.AccountManager().Find(account)
  	if err != nil {
  		return nil, err
  	}
  	// Request the wallet to sign the transaction
  	return wallet.SignTx(account, tx, s.b.ChainConfig().ChainID)
  }
docs: // sign is a helper function that signs a transaction with the private key of the given address.