code: def __from_edgelist(
      self,
      input_df,
      source="source",
      destination="destination",
      edge_attr=None,
      weight=None,
      edge_id=None,
      edge_type=None,
      renumber=True,
      legacy_renum_only=True,
      store_transposed=False,
  ):
      if legacy_renum_only:
          warning_msg = "The parameter 'legacy_renum_only' is deprecated and will be removed."
          warnings.warn(
              warning_msg,
          )
  
      # Verify column names present in input DataFrame
      s_col = source
      d_col = destination
      if not isinstance(s_col, list):
          s_col = [s_col]
      if not isinstance(d_col, list):
          d_col = [d_col]
      if not (
          set(s_col).issubset(set(input_df.columns))
          and set(d_col).issubset(set(input_df.columns))
      ):
          raise ValueError(
              "source column names and/or destination column "
              "names not found in input. Recheck the source and "
              "destination parameters"
          )
      df_columns = s_col + d_col
      self.vertex_columns = df_columns.copy()
  
      if edge_attr is not None:
          if (
              weight is not None
              or edge_id is not None
              or edge_type is not None
          ):
              raise ValueError(
                  "If specifying edge_attr, cannot specify weight/edge_id/edge_type"
              )
          if isinstance(edge_attr, str):
              weight = edge_attr
              edge_attr = [weight]
          if not (set(edge_attr).issubset(set(input_df.columns))):
              raise ValueError(
                  f"edge_attr column {edge_attr} not found in input."
                  "Recheck the edge_attr parameter"
              )
          self.properties.weighted = True
  
          if len(edge_attr) != 1 and len(edge_attr) != 3:
              raise ValueError(
                  f"Invalid number of edge attributes "
                  f"passed. {edge_attr}"
              )
  
          # The symmetrize step may add additional edges with unknown
          # ids and types for an undirected graph.  Therefore, only
          # directed graphs may be used with ids and types.
          if len(edge_attr) == 3:
              if not self.properties.directed:
                  raise ValueError(
                      "User-provided edge ids and edge "
                      "types are not permitted for an "
                      "undirected graph."
                  )
  
              weight, edge_id, edge_type = edge_attr
      else:
          edge_attr = []
          if weight is not None:
              edge_attr.append(weight)
              self.properties.weighted = True
          if edge_id is not None:
              edge_attr.append(edge_id)
          if edge_type is not None:
              edge_attr.append(edge_type)
  
      df_columns += edge_attr
      input_df = input_df[df_columns]
      # FIXME: check if the consolidated graph fits on the
      # device before gathering all the edge lists
  
      # Consolidation
      if isinstance(input_df, cudf.DataFrame):
          if len(input_df[source]) > 2147483100:
              raise ValueError(
                  "cudf dataFrame edge list is too big to fit in a single GPU"
              )
          elist = input_df
      elif isinstance(input_df, dask_cudf.DataFrame):
          if len(input_df[source]) > 2147483100:
              raise ValueError(
                  "dask_cudf dataFrame edge list is too big to fit in a single GPU"
              )
          elist = input_df.compute().reset_index(drop=True)
      else:
          raise TypeError(
              "input should be a cudf.DataFrame or a dask_cudf dataFrame"
          )
      # initial, unmodified input dataframe.
      self.input_df = elist
      self.weight_column = weight
      self.source_columns = source
      self.destination_columns = destination
  
      # Renumbering
      self.renumber_map = None
      self.store_transposed = store_transposed
      if renumber:
          # FIXME: Should SG do lazy evaluation like MG?
          elist, renumber_map = NumberMap.renumber(
              elist,
              source,
              destination,
              store_transposed=False,
              legacy_renum_only=legacy_renum_only,
          )
          source = renumber_map.renumbered_src_col_name
          destination = renumber_map.renumbered_dst_col_name
          # Use renumber_map to figure out if the python renumbering occured
          self.properties.renumbered = renumber_map.is_renumbered
          self.renumber_map = renumber_map
          self.renumber_map.implementation.src_col_names = (
              simpleGraphImpl.srcCol
          )
          self.renumber_map.implementation.dst_col_names = (
              simpleGraphImpl.dstCol
          )
      else:
          if type(source) is list and type(destination) is list:
              raise ValueError(
                  "set renumber to True for multi column ids"
              )
          elif elist[source].dtype not in [np.int32, np.int64] or elist[
              destination
          ].dtype not in [np.int32, np.int64]:
              raise ValueError(
                  "set renumber to True for non integer columns ids"
              )
  
      # The dataframe will be symmetrized iff the graph is undirected
      # otherwise the inital dataframe will be returned. Duplicated edges
      # will be dropped unless the graph is a MultiGraph(Not Implemented yet)
      # TODO: Update Symmetrize to work on Graph and/or DataFrame
      if edge_attr is not None:
          source_col, dest_col, value_col = symmetrize(
              elist,
              source,
              destination,
              edge_attr,
              multi=self.properties.multi_edge,
              symmetrize=not self.properties.directed,
          )
  
          if isinstance(value_col, cudf.DataFrame):
              value_dict = {}
              for i in value_col.columns:
                  value_dict[i] = value_col[i]
              value_col = value_dict
      else:
          value_col = None
          source_col, dest_col = symmetrize(
              elist,
              source,
              destination,
              multi=self.properties.multi_edge,
              symmetrize=not self.properties.directed,
          )
  
      if isinstance(value_col, dict):
          value_col = {
              self.edgeWeightCol: value_col[weight]
              if weight in value_col
              else None,
              self.edgeIdCol: value_col[edge_id]
              if edge_id in value_col
              else None,
              self.edgeTypeCol: value_col[edge_type]
              if edge_type in value_col
              else None,
          }
  
      self.edgelist = simpleGraphImpl.EdgeList(
          source_col, dest_col, value_col
      )
  
      if self.batch_enabled:
          self._replicate_edgelist()
  
      self._make_plc_graph(
          value_col=value_col,
          store_transposed=store_transposed,
          renumber=renumber,
      )
  
imports: from cugraph.structure import graph_primtypes_wrapper
  from cugraph.structure.graph_primtypes_wrapper import Direction
  from cugraph.structure.symmetrize import symmetrize
  from cugraph.structure.number_map import NumberMap
  import cugraph.dask.common.mg_utils
  import cudf
  import dask_cudf
  import cugraph.dask.comms.comms
  import pandas
  import numpy
  import warnings
  from cugraph.dask.structure import replication
  from typing import Union, Dict
  from pylibcugraph import get_two_hop_neighbors, select_random_vertices
  from pylibcugraph import ResourceHandle, GraphProperties, SGGraph
label_desc: Use image node_id 2 for calling the simpleGraphImpl obj's underlying member method code with example usage: obj.__from_edgelist(input_df, source, destination, edge_attr, weight, edge_id, edge_type, renumber, legacy_renum_only, store_transposed) without return types