<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_deformation(cls, deformation):
 """ Factory method that returns a Strain object from a deformation gradient Args: deformation (3x3 array-like):
 """

        dfm = Deformation(deformation)
        return cls(0.5 * (np.dot(dfm.trans, dfm) - np.eye(3)))