<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rate_lack(self, max_rate):
 """ The time interval that this fragment lacks to respect the given max rate. A positive value means that the current fragment is faster than the max rate (bad). A negative or zero value means that the current fragment has rate slower or equal to the max rate (good). Always return ``0.000`` for fragments that are not ``REGULAR``. :param max_rate: the maximum rate (characters/second) :type max_rate: :class:`~aeneas.exacttiming.Decimal` :rtype: :class:`~aeneas.exacttiming.TimeValue` .. versionadded:: 1.7.0 """

        if self.fragment_type == self.REGULAR:
            return self.chars / max_rate - self.length
        return TimeValue("0.000")