def METHOD_NAME(self, data: Data) -> RootedSubgraphData:
    out = self.extract(data)
    d = RootedSubgraphData.from_dict(data.to_dict())
    d.sub_edge_index, d.n_id, d.e_id, d.n_sub_batch, d.e_sub_batch = out
    return d