<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cylinder_inertia(mass, radius, height, transform=None):
 """ Return the inertia tensor of a cylinder. Parameters mass : float Mass of cylinder radius : float Radius of cylinder height : float Height of cylinder transform : (4,4) float Transformation of cylinder Returns inertia : (3,3) float Inertia tensor """

    h2, r2 = height ** 2, radius ** 2
    diagonal = np.array([((mass * h2) / 12) + ((mass * r2) / 4),
                         ((mass * h2) / 12) + ((mass * r2) / 4),
                         (mass * r2) / 2])
    inertia = diagonal * np.eye(3)

    if transform is not None:
        inertia = transform_inertia(transform, inertia)

    return inertia