code: def _calc_bc_full(G, Gnx, normalized, weight, k, seed, result_dtype):
      df = cugraph.edge_betweenness_centrality(
          G,
          k=k,
          normalized=normalized,
          weight=weight,
          seed=seed,
          result_dtype=result_dtype,
      )
  
      assert (
          df["betweenness_centrality"].dtype == result_dtype
      ), "'betweenness_centrality' column has not the expected type"
  
      nx_bc_dict = nx.edge_betweenness_centrality(
          Gnx, k=k, normalized=normalized, seed=seed, weight=weight
      )
  
      nx_df = generate_nx_result(
          nx_bc_dict, type(Gnx) is nx.DiGraph
      ).rename(columns={"betweenness_centrality": "ref_bc"}, copy=False)
  
      merged_df = (
          df.merge(nx_df, on=["src", "dst"])
          .rename(
              columns={"betweenness_centrality": "cu_bc"}, copy=False
          )
          .reset_index(drop=True)
      )
  
      return merged_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 6 for calling a global function with example usage: _calc_bc_full(G, Gnx, normalized, weight, k, seed, result_dtype) and returns: merged_df