<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def web(ticker, field=None, start=None, end=None, mrefresh=False, source='yahoo'):
 """ Data provider wrapper around pandas.io.data provider. Provides memoization. """

    if source == 'yahoo' and field is None:
        field = 'Adj Close'

    tmp = _download_web(ticker, data_source=source,
                        start=start, end=end)

    if tmp is None:
        raise ValueError('failed to retrieve data for %s:%s' % (ticker, field))

    if field:
        return tmp[field]
    else:
        return tmp