def to_doc(self):
        doc = {}
        for _key, _value in vars(self).items():
            if isinstance(_value, TargetingCriterion):
                doc[_key] = _value.to_doc()
            else:
                doc[_key] = _value

        # Save metadata for use when re-cerealizing data
        doc['_metadata'] = {
            'cls': self.__class__.__name__,
        }
        return doc
Override this method to initialize the app.
dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/targeting.py/TargetingData.to_doc--crossover with--dataset/ETHPy150Open facebook/sparts/sparts/tasks/tui.py/UITask.appStart