code: def construct_graph(dask_dataframe):
      """
      Args:
          dask_dataframe:
              dask_dataframe contains weighted and undirected edges with self
              loops. Multiple edges will likely be present as well.
          directed:
              If True, the graph will be directed.
          renumber:
              If True, the graph will be renumbered.
      Returns:
          G:  cugraph.Graph
      """
      assert dask_dataframe["src"].dtype == "int64"
      assert dask_dataframe["dst"].dtype == "int64"
  
      if "etp" in dask_dataframe.columns:
          assert dask_dataframe["etp"].dtype == "int32"
  
      G = cugraph.MultiGraph(directed=True)
      G.from_dask_cudf_edgelist(
          dask_dataframe,
          source="src",
          destination="dst",
          edge_type="etp" if "etp" in dask_dataframe.columns else None,
          renumber=False,
      )
      return G
  
imports: import logging
  import warnings
  import argparse
  import traceback
  from cugraph.testing.mg_utils import generate_edgelist_rmat, get_allocation_counts_dask_lazy, sizeof_fmt, get_peak_output_ratio_across_workers, start_dask_client, stop_dask_client, enable_spilling
  from cugraph.structure.symmetrize import symmetrize
  from cugraph.gnn import BulkSampler
  import cugraph
  import json
  import re
  import os
  import gc
  from time import sleep, perf_counter
  from math import ceil
  import pandas
  import numpy
  import cupy
  import cudf
  import dask_cudf
  import dask.dataframe
  from dask.distributed import default_client
  from cugraph.dask import get_n_workers
  from typing import Optional, Union, Dict
label_desc: Use image node_id 1 for calling a global function with example usage: construct_graph(dask_dataframe) and returns: G