code: def get_symbol_returns_from_yahoo(symbol, start=None, end=None):
      """
      Wrapper for pandas.io.data.get_data_yahoo().
      Retrieves prices for symbol from yahoo and computes returns
      based on adjusted closing prices.
  
      Parameters
      ----------
      symbol : str
          Symbol name to load, e.g. 'SPY'
      start : pandas.Timestamp compatible, optional
          Start date of time period to retrieve
      end : pandas.Timestamp compatible, optional
          End date of time period to retrieve
  
      Returns
      -------
      pandas.DataFrame
          Returns of symbol in requested period.
      """
  
      try:
          px = web.get_data_yahoo(symbol, start=start, end=end)
          px["date"] = pd.to_datetime(px["date"])
          px.set_index("date", drop=False, inplace=True)
          rets = px[["adjclose"]].pct_change().dropna()
      except Exception as e:
          warnings.warn(
              "Yahoo Finance read failed: {}, falling back to Google".format(
                  e
              ),
              UserWarning,
          )
          px = web.get_data_google(symbol, start=start, end=end)
          rets = px[["Close"]].pct_change().dropna()
  
      rets.index = rets.index.tz_localize("UTC")
      rets.columns = [symbol]
      return rets
  
imports: from datetime import datetime
  from functools import wraps
  from os import makedirs, environ
  from os.path import expanduser, join, getmtime, isdir
  import errno
  import warnings
  import numpy
  from numpy.lib.stride_tricks import as_strided
  import pandas
  from pandas.tseries.offsets import BDay
  from .deprecate import deprecated
label_desc: Use image node_id 15 for calling a global function with example usage: get_symbol_returns_from_yahoo(symbol, start, end) and returns: rets