<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def length_by_id(self):
 """In some usecases you just need the sequence lengths in an indexed fashion. If you access this attribute, we will make a hash map in memory."""

        hashmap = dict((seq.id, len(seq)) for seq in self)
        tmp = hashmap.copy()
        hashmap.update(tmp)
        return hashmap