code: def generate_dataframe_from_nx_dict(nx_dict):
      nx_edges, nx_bc = zip(*sorted(nx_dict.items()))
      nx_src, nx_dst = zip(*nx_edges)
      df = cudf.DataFrame(
          {
              "src": nx_src,
              "dst": nx_dst,
              "betweenness_centrality": nx_bc,
          }
      )
      return df
  
imports: import gc
  import pytest
  import random
  import networkx
  import numpy
  import cupy
  import cudf
  import cugraph
  from cugraph.datasets import karate_disjoint
  from cugraph.testing import utils, SMALL_DATASETS
label_desc: Use image node_id 9 for calling a global function with example usage: generate_dataframe_from_nx_dict(nx_dict) and returns: df