code: def test_structured_negative_sampling_feasible():
      edge_index = torch.LongTensor(
          [[0, 0, 1, 1, 2, 2, 2], [1, 2, 0, 2, 0, 1, 1]]
      )
      assert not structured_negative_sampling_feasible(
          edge_index, 3, False
      )
      assert structured_negative_sampling_feasible(edge_index, 3, True)
      assert structured_negative_sampling_feasible(edge_index, 4, False)
  
file_path: pytorch_geometric/test/utils/test_negative_sampling.py
imports: import torch
  from torch_geometric.utils import batched_negative_sampling, contains_self_loops, is_undirected, negative_sampling, structured_negative_sampling, structured_negative_sampling_feasible, to_undirected
  from torch_geometric.utils._negative_sampling import edge_index_to_vector, vector_to_edge_index
label_desc: Use image node_id 8 for calling a global function with example usage: test_structured_negative_sampling_feasible() without return types