code: def sample_subgraph(subgraph, max_neigh=64):
      nodes, eids = subgraph.sample_predecessor(
          nodes=subgraph.nodes,
          return_eids=True,
          shuffle=True,
          max_degree=max_neigh,
      )
  
      eids = np.hstack(eids)
      new_edges = subgraph.edges[eids]
      new_edges_feat = subgraph.edge_feat["feat"][eids]
      subgraph = pgl.graph.Graph(
          num_nodes=subgraph.num_nodes,
          edges=new_edges,
          node_feat=subgraph.node_feat,
          edge_feat={"feat": new_edges_feat},
      )
      return subgraph
  
imports: import math
  import math
  import ssl
  from sklearn.metrics import roc_auc_score
  import torch
  import paddle
  import pgl
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from pgl.contrib.ogb.nodeproppred.dataset_pgl import PglNodePropPredDataset
  import time
  import copy
  from ogb.nodeproppred import Evaluator
  import pickle
  from model import Proteins_baseline_model, Proteins_label_embedding_model
  from partition import RandomPartition
  from cross_edge_feat import cross_edge_feat
  from dataset.random_partition_dataset import RandomPartition
  import os
  import argparse
  from tqdm import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: sample_subgraph(subgraph, max_neigh) and returns: subgraph