class_docstr: Class which stores vertex and edge properties that can be used to construct
  Graphs from individual property selections and used later to annotate graph
  algorithm results with corresponding properties.
class_docstr_tok: ["Class","which","stores","vertex","and","edge","properties","that","can","be","used","to","construct","Graphs","from","individual","property","selections","and","used","later","to","annotate","graph","algorithm","results","with","corresponding","properties","."]
docstr: Renumber edge IDs to be contiguous by type.
  
  Parameters
  ----------
  prev_id_column : str, optional
      Column name to save the edge ID before renumbering.
  
  Returns a DataFrame with the start and stop IDs for each edge type.
  Stop is *inclusive*.
docstr_tok: ["Renumber","edge","IDs","to","be","contiguous","by","type",".","Parameters","--","--","--","--","--","prev_id_column",":","str",",","optional","Column","name","to","save","the","edge","ID","before","renumbering",".","Returns","a","DataFrame","with","the","start","and","stop","IDs","for","each","edge","type",".","Stop","is","*","inclusive","*","."]
code: def renumber_edges_by_type(self, prev_id_column=None):
      """Renumber edge IDs to be contiguous by type.
  
      Parameters
      ----------
      prev_id_column : str, optional
          Column name to save the edge ID before renumbering.
  
      Returns a DataFrame with the start and stop IDs for each edge type.
      Stop is *inclusive*.
      """
      # TODO: keep track if edges are already numbered correctly.
      if self.__edge_prop_dataframe is None:
          return None
      if (
          prev_id_column is not None
          and prev_id_column in self.__edge_prop_dataframe
      ):
          raise ValueError(
              f"Can't save previous IDs to existing column {prev_id_column!r}"
          )
      df = self.__edge_prop_dataframe
      index_dtype = df.index.dtype
  
      # FIXME DASK_CUDF: https://github.com/rapidsai/cudf/issues/11795
      cat_dtype = df.dtypes[self.type_col_name]
      df[self.type_col_name] = df[self.type_col_name].astype(str)
  
      # Include self.edge_id_col_name when sorting by values to ensure we can
      # evenly distribute the data across workers.
      df = df.reset_index().persist()
      if len(cat_dtype.categories) > 1 and len(self.edge_types) > 1:
          df = df.sort_values(
              by=[self.type_col_name, self.edge_id_col_name],
              ignore_index=True,
          ).persist()
      if prev_id_column is not None:
          df[prev_id_column] = df[self.edge_id_col_name]
  
      # FIXME DASK_CUDF: https://github.com/rapidsai/cudf/issues/11795
      df[self.type_col_name] = df[self.type_col_name].astype(cat_dtype)
  
      df[self.edge_id_col_name] = 1
      df[self.edge_id_col_name] = df[self.edge_id_col_name].cumsum() - 1
      df[self.edge_id_col_name] = df[self.edge_id_col_name].astype(
          index_dtype
      )
      self.__edge_prop_dataframe = (
          df.persist()
          .set_index(self.edge_id_col_name, sorted=True)
          .persist()
      )
  
      # FIXME DASK_CUDF: https://github.com/rapidsai/cudf/issues/11795
      df = self._edge_type_value_counts
      if df.index.dtype == cat_dtype:
          df.index = df.index.astype(str)
  
      # self._edge_type_value_counts
      rv = df.sort_index().cumsum().to_frame("stop")
  
      # FIXME DASK_CUDF: https://github.com/rapidsai/cudf/issues/11795
      df.index = df.index.astype(cat_dtype)
  
      rv["start"] = rv["stop"].shift(1, fill_value=0)
      rv["stop"] -= 1  # Make inclusive
      return rv[["start", "stop"]]
  
imports: import cudf
  import cupy
  import cugraph
  import dask_cudf
  import cugraph.dask
  from cugraph.utilities.utils import import_optional, create_list_series_from_2d_ar
  from typing import Union
label_desc: Use image node_id 31 for calling the EXPERIMENTAL__MGPropertyGraph obj's underlying member method code with example usage: obj.renumber_edges_by_type(prev_id_column) and returns: rv, None