code: def test_get_ef():
      d = d_pass[4]
      pf = build_portfolio(**d)
      ef = pf._get_ef()
      assert isinstance(ef, EfficientFrontier)
      assert isinstance(pf.ef, EfficientFrontier)
      assert pf.ef == ef
      assert (pf.comp_mean_returns(freq=1) == ef.mean_returns).all()
      assert (pf.comp_cov() == ef.cov_matrix).all().all()
      assert pf.freq == ef.freq
      assert pf.risk_free_rate == ef.risk_free_rate
      assert ef.names == pf.portfolio["Name"].values.tolist()
      assert ef.num_stocks == len(pf.stocks)
  
imports: import datetime
  import os
  import pathlib
  import matplotlib.pylab
  import numpy
  import pandas
  import pytest
  import quandl
  import yfinance
  from finquant.efficient_frontier import EfficientFrontier
  from finquant.portfolio import Portfolio, build_portfolio
  from finquant.stock import Stock
label_desc: Use image node_id 9 for calling a global function with example usage: test_get_ef() without return types