<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_fit_to_structure(self, structure, tol=1e-2):
 """ Tests whether a tensor is invariant with respect to the symmetry operations of a particular structure by testing whether the residual of the symmetric portion is below a tolerance Args: structure (Structure):
 structure to be fit to tol (float):
 tolerance for symmetry testing """

        return (self - self.fit_to_structure(structure) < tol).all()