code: def test_stock_portfolio():
      """
      This functions tests the basic creation of a StockPortfolio with some sample Stocks.
      """
  
      portfolio = StockPortfolio()
  
      portfolio.add_stock(
          stock_symbol="BBVA",
          stock_country="spain",
          purchase_date="04/01/2018",
          num_of_shares=2,
          cost_per_share=7.2,
      )
  
      portfolio.add_stock(
          stock_symbol="ELE",
          stock_country="spain",
          purchase_date="13/06/2019",
          num_of_shares=15,
          cost_per_share=23.8,
      )
  
      print(portfolio.data.head())
      portfolio.refresh()
      print(portfolio.data.head())
  
imports: import pyrtfolio
  from pyrtfolio.StockPortfolio import StockPortfolio
label_desc: Use image node_id 2 for calling a global function with example usage: test_stock_portfolio() without return types