<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def total_span(self) -> BioCLocation: """The total span of this annotation. Discontinued locations will be merged."""

        if not self.locations:
            raise ValueError('BioCAnnotation must have at least one location')
        start = min(l.offset for l in self.locations)
        end = max(l.end for l in self.locations)
        return BioCLocation(start, end - start)