code: def df_to_gdf(df: Any):
      import cudf
  
      if isinstance(df, cudf.DataFrame):
          return df
      elif isinstance(df, pd.DataFrame):
          return cudf.from_pandas(df)
      else:
          raise ValueError(
              "Unsupported data type, expected pd.DataFrame or cudf.DataFrame, got: %s",
              type(df),
          )
  
file_path: pygraphistry/graphistry/plugins/cugraph.py
imports: import pandas
  from typing import Any, Dict, List, Optional, Union
  from graphistry.constants import NODE
  from graphistry.Engine import EngineAbstract
  from graphistry.Plottable import Plottable
  from graphistry.plugins_types import CuGraphKind
  from graphistry.util import setup_logger
label_desc: Use image node_id 1 for calling a global function with example usage: df_to_gdf(df) and returns: df, cudf