<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def decompose(P):
 """ Decompose a polynomial to component form. In array missing values are padded with 0 to make decomposition compatible with ``chaospy.sum(Q, 0)``. Args: P (Poly) : Input data. Returns: (Poly) : Decomposed polynomial with `P.shape==(M,)+Q.shape` where `M` is the number of components in `P`. Examples: [q0^2-1, 2] [[-1, 2], [q0^2, 0]] [q0^2-1, 2] """

    P = P.copy()

    if not P:
        return P

    out = [Poly({key:P.A[key]}) for key in P.keys]
    return Poly(out, None, None, None)