docstr: Topology-aware collapse by given column attribute starting at `node`
  
  Traverses directed graph from start node `node` and collapses clusters of nodes that share
  the same property so that topology is preserved.
  
  :param node: start `node` to begin traversal
  :param attribute: the given `attribute` to collapse over within `column`
  :param column: the `column` of nodes DataFrame that contains `attribute` to collapse over
  :param self_edges: whether to include self edges in the collapsed graph
  :param unwrap: whether to unwrap the collapsed graph into a single node
  :param verbose: whether to print out collapse summary information
  
  :returns:A new Graphistry instance with nodes and edges DataFrame containing collapsed nodes and edges given by column attribute -- nodes and edges DataFrames contain six new columns `collapse_{node | edges}` and `final_{node | edges}`, while original (node, src, dst) columns are left untouched
  :rtype: Plottable
docstr_tok: ["Topology-aware","collapse","by","given","column","attribute","starting","at","`","node","`","Traverses","directed","graph","from","start","node","`","node","`","and","collapses","clusters","of","nodes","that","share","the","same","property","so","that","topology","is","preserved",".",":","param","node",":","start","`","node","`","to","begin","traversal",":","param","attribute",":","the","given","`","attribute","`","to","collapse","over","within","`","column","`",":","param","column",":","the","`","column","`","of","nodes","DataFrame","that","contains","`","attribute","`","to","collapse","over",":","param","self_edges",":","whether","to","include","self","edges","in","the","collapsed","graph",":","param","unwrap",":","whether","to","unwrap","the","collapsed","graph","into","a","single","node",":","param","verbose",":","whether","to","print","out","collapse","summary","information",":","returns",":","A","new","Graphistry","instance","with","nodes","and","edges","DataFrame","containing","collapsed","nodes","and","edges","given","by","column","attribute","--","nodes","and","edges","DataFrames","contain","six","new","columns","`","collapse_","{","node","|","edges","}","`","and","`","final_","{","node","|","edges","}","`",",","while","original","(","node",",","src",",","dst",")","columns","are","left","untouched",":","rtype",":","Plottable"]
code: def collapse(
      self,
      node: Union[str, int],
      attribute: Union[str, int],
      column: Union[str, int],
      self_edges: bool = False,
      unwrap: bool = False,
      verbose: bool = False,
  ):
      """
      Topology-aware collapse by given column attribute starting at `node`
  
      Traverses directed graph from start node `node` and collapses clusters of nodes that share
      the same property so that topology is preserved.
  
      :param node: start `node` to begin traversal
      :param attribute: the given `attribute` to collapse over within `column`
      :param column: the `column` of nodes DataFrame that contains `attribute` to collapse over
      :param self_edges: whether to include self edges in the collapsed graph
      :param unwrap: whether to unwrap the collapsed graph into a single node
      :param verbose: whether to print out collapse summary information
  
      :returns:A new Graphistry instance with nodes and edges DataFrame containing collapsed nodes and edges given by column attribute -- nodes and edges DataFrames contain six new columns `collapse_{node | edges}` and `final_{node | edges}`, while original (node, src, dst) columns are left untouched
      :rtype: Plottable
      """
      # TODO FIXME CHECK SELF LOOPS?
      return collapse_by(
          self,
          start_node=node,
          parent=node,
          attribute=attribute,
          column=column,
          seen={},
          self_edges=self_edges,
          unwrap=unwrap,
          verbose=verbose,
      )
  
imports: import logging, numpy, pandas
  from typing import Any, List, Union, TYPE_CHECKING
  from typing_extensions import Literal
  from graphistry.Engine import Engine, EngineAbstract
  from graphistry.Plottable import Plottable
  from graphistry.util import setup_logger
  from .chain import chain
  from .collapse import collapse_by
  from .hop import hop
  from .filter_by_dict import filter_edges_by_dict, filter_nodes_by_dict
label_desc: Use image node_id 10 for calling the ComputeMixin obj's underlying member method code with example usage: obj.collapse(node, attribute, column, _edges, unwrap, verbose) and returns: collapse_by