def METHOD_NAME(self, num_infected_nodes: int,
              max_path_length: int) -> Explanation:
    data = self.graph_generator()
    perm = torch.randperm(data.num_nodes)
    x = torch.zeros((data.num_nodes, 2))
    x[perm[:num_infected_nodes], 1] = 1  # Infected
    x[perm[num_infected_nodes:], 0] = 1  # Healthy
    y = torch.empty(data.num_nodes, dtype=torch.long)
    y.fill_(max_path_length + 1)
    y[perm[:num_infected_nodes]] = 0  # Infected nodes have label `0`.
    edge_mask = torch.zeros(data.num_edges, dtype=torch.bool)
    for num_hops in range(1, max_path_length + 1):
        sub_node_index, _, _, sub_edge_mask = k_hop_subgraph(
            perm[:num_infected_nodes], num_hops, data.edge_index,
            num_nodes=data.num_nodes, flow='target_to_source',
            directed=True)
        value = torch.full_like(sub_node_index, fill_value=num_hops)
        y[sub_node_index] = torch.min(y[sub_node_index], value)
        edge_mask |= sub_edge_mask
    return Explanation(
        x=x,
        edge_index=data.edge_index,
        y=y,
        edge_mask=edge_mask.to(torch.float),
    )