<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cdslen(self):
 """ Translated length of this feature. Undefined for non-mRNA features. """

        if self.type != 'mRNA':
            return None

        return sum([len(c) for c in self.children if c.type == 'CDS'])