<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pipe_fetchdata(context=None, _INPUT=None, conf=None, **kwargs):
 """A source that fetches and parses an XML or JSON file. Loopable. Parameters context : pipe2py.Context object _INPUT : pipeforever pipe or an iterable of items or fields conf : { 'URL': {'value': <url>}, 'path': {'value': <dot separated path to data list>} } Yields ------ _OUTPUT : items Examples -------- [u'y:repeatcount', u'description', u'pubDate', u'title', u'y:published'] ['alarmTime', 'begin', 'duration', 'places', 'subject', 'uid'] ['appointment', 'reminder'] """

    # todo: iCal and KML
    funcs = get_splits(None, conf, **cdicts(opts, kwargs))
    parsed = get_parsed(_INPUT, funcs[0])
    results = starmap(parse_result, parsed)
    items = imap(utils.gen_items, results)
    _OUTPUT = utils.multiplex(items)
    return _OUTPUT