input: Write a python function to determine if a stock closed higher or lower than its opening price using yfinance.
  assert stock_performance("TSLA") in ["TSLA closed higher than its opening price.", "TSLA closed lower than its opening price."]
  assert isinstance(stock_performance("AAPL"), str)
  assert stock_performance("GOOG") in ["GOOG closed higher than its opening price.", "GOOG closed lower than its opening price."]
output: import yfinance as yf
  
  def stock_performance(ticker):
      stock = yf.Ticker(ticker)
      hist = stock.history(period="1d")
      if hist.empty:
          return "Data not available"
      open_price = hist.iloc[0]['Open']
      close_price = hist.iloc[0]['Close']
      if close_price > open_price:
          return f"{ticker} closed higher than its opening price."
      else:
          return f"{ticker} closed lower than its opening price."