code: def layout_cugraph(
      self: Plottable,
      layout: str = "force_atlas2",
      params: dict = {},
      kind: CuGraphKind = "Graph",
      directed=True,
      G: Optional[Any] = None,
      bind_position: bool = True,
      x_out_col: str = "x",
      y_out_col: str = "y",
      play: Optional[int] = 0,
  ) -> Plottable:
      """Layout the grpah using a cuGraph algorithm. For a list of layouts, see cugraph documentation (currently just force_atlas2).
  
      :param layout: Name of an cugraph layout method like `force_atlas2`
      :type layout: str
  
      :param params: Any named parameters to pass to the underlying cugraph method
      :type params: dict
  
      :param kind: The kind of cugraph Graph
      :type kind: CuGraphKind
  
      :param directed: During the to_cugraph conversion, whether to be directed. (default True)
      :type directed: bool
  
      :param G: The cugraph graph (G) to layout. If None, the current graph is used.
      :type G: Optional[Any]
  
      :param bind_position: Whether to call bind(point_x=, point_y=) (default True)
      :type bind_position: bool
  
      :param x_out_col: Attribute to write x position to. (default 'x')
      :type x_out_col: str
  
      :param y_out_col: Attribute to write x position to. (default 'y')
      :type y_out_col: str
  
      :param play: If defined, set settings(url_params={'play': play}). (default 0)
      :type play: Optional[str]
  
      :returns: Plotter
      :rtype: Plotter
  
      **Example: ForceAtlas2 layout**
          ::
  
              import graphistry, pandas as pd
              edges = pd.DataFrame({'s': ['a','b','c','d'], 'd': ['b','c','d','e']})
              g = graphistry.edges(edges, 's', 'd')
              g.layout_cugraph().plot()
  
      **Example: Change which column names are generated**
          ::
  
              import graphistry, pandas as pd
              edges = pd.DataFrame({'s': ['a','b','c','d'], 'd': ['b','c','d','e']})
              g = graphistry.edges(edges, 's', 'd')
              g2 = g.layout_cugraph('force_atlas2', x_out_col='my_x', y_out_col='my_y')
              assert 'my_x' in g2._nodes
              assert g2._point_x == 'my_x'
              g2.plot()
  
      **Example: Pass parameters to layout methods**
          ::
  
              import graphistry, pandas as pd
              edges = pd.DataFrame({'s': ['a','b','c','d'], 'd': ['b','c','d','e']})
              g = graphistry.edges(edges, 's', 'd')
              g2 = g.layout_cugraph('forceatlas_2', params={'lin_log_mode': True, 'prevent_overlapping': True})
              g2.plot()
      """
  
      import cugraph
  
      g = self.materialize_nodes(engine=EngineAbstract.CUDF)
  
      if layout not in layout_algs:
          raise ValueError("Unsupported algorithm: %s", layout)
  
      if G is None:
          G = to_cugraph(self, kind=kind, directed=directed)
  
      out = getattr(cugraph, layout)(G, **params)
      if "source" in out.columns:
          out = out.rename(
              columns={"source": "src", "destination": "dst"}
          )
  
      if g._node != "vertex":
          out = out.rename(columns={"vertex": g._node})
  
      nodes_gdf = g._nodes[
          [x for x in g._nodes if x not in out.columns or x == g._node]
      ].merge(out, how="left", on=g._node)
  
      g2 = g.nodes(
          nodes_gdf.assign(
              **{x_out_col: nodes_gdf["x"], y_out_col: nodes_gdf["y"]}
          )
      )
      if bind_position:
          g2 = g2.bind(point_x=x_out_col, point_y=y_out_col)
      if play is not None:
          g2 = g2.layout_settings(play=play)
      return g2
  
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 5 for calling a global function with example usage: layout_cugraph(layout, params, kind, directed, G, bind_position, x_out_col, y_out_col, play) and returns: g2