<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rollaxis(vari, axis, start=0):
 """ Roll the specified axis backwards, until it lies in a given position. Args: vari (chaospy.poly.base.Poly, numpy.ndarray):
 Input array or polynomial. axis (int):
 The axis to roll backwards. The positions of the other axes do not change relative to one another. start (int):
 The axis is rolled until it lies before thes position. """

    if isinstance(vari, Poly):
        core_old = vari.A.copy()
        core_new = {}
        for key in vari.keys:
            core_new[key] = rollaxis(core_old[key], axis, start)
        return Poly(core_new, vari.dim, None, vari.dtype)

    return numpy.rollaxis(vari, axis, start)