<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prune(A, threshold):
 """ Remove coefficients that is not larger than a given threshold. Args: A (Poly):
 Input data. threshold (float):
 Threshold for which values to cut. Returns: (Poly):
 Same type as A. Examples: 0.0625q0^2+0.25q0+1.0 0.25q0+1.0 1.0 0.0 """

    if isinstance(A, Poly):
        B = A.A.copy()
        for key in A.keys:
            values = B[key].copy()
            values[numpy.abs(values) < threshold] = 0.
            B[key] = values
        return Poly(B, A.dim, A.shape, A.dtype)

    A = A.copy()
    A[numpy.abs(A) < threshold] = 0.
    return A