code: def _calc_bc_subset_fixed(
      G, Gnx, normalized, weight, k, seed, result_dtype
  ):
      assert isinstance(k, int), (
          "This test is meant for verifying coherence "
          "when k is given as an int"
      )
      # In the fixed set we compare cu_bc against itself as we random.seed(seed)
      # on the same seed and then sample on the number of vertices themselves
      if seed is None:
          seed = 123  # We want the same sources so we use the same seed when
          # randomly selecting vertices both below and internally(plc)
      sources = G.select_random_vertices(seed, k)
  
      if G.renumbered:
          sources_df = cudf.DataFrame({"src": sources})
          sources = (
              G.unrenumber(sources_df, "src")["src"]
              .to_pandas()
              .tolist()
          )
  
      # The first call is going to proceed to the random sampling in the same
      # fashion as the lines above
      df = cugraph.edge_betweenness_centrality(
          G,
          k=k,
          normalized=normalized,
          weight=weight,
          seed=seed,
          result_dtype=result_dtype,
      ).rename(columns={"betweenness_centrality": "cu_bc"}, copy=False)
  
      # The second call is going to process source that were already sampled
      # We set seed to None as k : int, seed : not none should not be normal
      # behavior
      df2 = (
          cugraph.edge_betweenness_centrality(
              G,
              k=sources,
              normalized=normalized,
              weight=weight,
              seed=None,
              result_dtype=result_dtype,
          )
          .rename(
              columns={"betweenness_centrality": "ref_bc"}, copy=False
          )
          .reset_index(drop=True)
      )
  
      merged_df = df.merge(df2, on=["src", "dst"]).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 5 for calling a global function with example usage: _calc_bc_subset_fixed(G, Gnx, normalized, weight, k, seed, result_dtype) and returns: merged_df