code: def __create_node_to_graph_idx(
      num_nodes_per_graph: List[int],
  ) -> Iterable[int]:
      for i, graph_size in enumerate(num_nodes_per_graph):
          yield from (i for _ in range(graph_size))
  
imports: from typing_extensions import Final
  import logging
  import numpy
  import torch
  from collections import defaultdict
  from torch import nn
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Set, Tuple, TypeVar, Union
  from ptgnn.baseneuralmodel import AbstractNeuralModel, ModuleWithMetrics
  from ptgnn.baseneuralmodel.utils.data import enforce_not_None
  from ptgnn.neuralmodels.gnn.messagepassing.abstractmessagepassing import AbstractMessagePassingLayer
  from ptgnn.neuralmodels.gnn.structs import GnnOutput, GraphData, TensorizedGraphData
label_desc: Use image node_id 12 for calling the GraphNeuralNetworkModel obj's underlying member method code with example usage: obj.__create_node_to_graph_idx(num_nodes_per_graph) without return types