<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unique_lorem(self, field=None, val=None):
 """ Returns lorem ipsum text guaranteed to be unique. First uses lorem function then adds a unique integer suffix. """

        lorem_text = self.lorem(field, val)
        max_length = getattr(field, 'max_length', None)

        suffix_str = str(self.unique_suffixes[field])
        unique_text = lorem_text + suffix_str
        if max_length is not None:
            # take the last max_length chars
            unique_text = unique_text[-max_length:]
        self.unique_suffixes[field] += 1
        return unique_text