code: def sparsity(
      coalition: list,
      data: Data,
      subgraph_building_method="zero_filling",
  ):
      if subgraph_building_method == "zero_filling":
          return 1.0 - len(coalition) / data.num_nodes
  
      elif subgraph_building_method == "split":
          row, col = data.edge_index
          node_mask = torch.zeros(data.x.shape[0])
          node_mask[coalition] = 1.0
          edge_mask = (node_mask[row] == 1) & (node_mask[col] == 1)
          return 1.0 - (edge_mask.sum() / edge_mask.shape[0]).item()
  
imports: import copy
  import torch
  import numpy
  from scipy.special import comb
  from itertools import combinations
  import torch.nn.functional
  from torch_geometric.utils import to_networkx
  from torch_geometric.data import Data, Batch, Dataset
  from torch_geometric.loader import DataLoader
label_desc: Use image node_id 12 for calling a global function with example usage: sparsity(coalition, data, subgraph_building_method) and returns: unknown, unknown