def parse(self, *args, **kwargs):
        return_value = super(Activity, self).parse(*args, **kwargs)
        if self.records[0].get_data('type') != 'activity':
            raise FitParseError("File parsed is not an activity file.")
        return return_value
dataset/ETHPy150Open dtcooper/python-fitparse/fitparse/activity.py/Activity.parse/original