code: def json(self):
          
  
          def _json_or_none(obj):
              return None if obj is None else obj.json()
  
          data = {
              "segment_models": [_json_or_none(m) for m in self.segment_models],
              "model_lookup": {
                  key: _json_or_none(val) for key, val in self.model_lookup.items()
              },
              "prediction_segment_type": self.prediction_segment_type,
              "prediction_segment_name_mapping": self.prediction_segment_name_mapping,
              "prediction_feature_processor": self.prediction_feature_processor.__name__,
          }
          return data
docs: Return a JSON-serializable representation of this result.
  
          The output of this function can be converted to a serialized string
          with :any:`json.dumps`.