<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def getitem_by_path(d, path):
 """Access item in d using path. a = { 0: { 1: 'item' } } getitem_by_path(a, [0, 1]) == 'item' """

    return reduce(
        lambda d, k: d[k],
        path,
        d
    )