def METHOD_NAME(self, fp):
    for line in fp.readlines():
        r = AttrDict(json.loads(line))
        if r.type == 'frame':
            self.frames[r.id].update(r)
        elif r.type == 'group':
            self.groups[r.id].update(r)
        f = self.frames[r.frame or '']
        if not f.rows:
            f.rows = [r]
        else:
            f.rows.append(r)
    self.total_ms = 0
    if self.frames:
        self.total_ms = sum(f.duration_ms or 0 for f in self.frames.values())
        for f in self.frames.values():
            for r, x, y, _ in self.iterdeep(f.rows):
                self.width = max(self.width, x+len(r.text))
                self.height = max(self.height, y)