class_docstr: UMAP Mixin for automagic UMAPing
class_docstr_tok: ["UMAP","Mixin","for","automagic","UMAPing"]
docstr: Filter edges based on _weighted_edges_df (ex: from .umap())
docstr_tok: ["Filter","edges","based","on","_weighted_edges_df","(","ex",":","from",".umap","(",")",")"]
code: def filter_weighted_edges(
      self,
      scale: float = 1.0,
      index_to_nodes_dict: Optional[Dict] = None,
      inplace: bool = False,
      kind: str = "nodes",
  ):
      """
      Filter edges based on _weighted_edges_df (ex: from .umap())
  
      """
      if inplace:
          res = self
      else:
          res = self.bind()
  
      if res._weighted_edges_df is not None:
          res._weighted_edges_df_from_nodes = (
              prune_weighted_edges_df_and_relabel_nodes(
                  res._weighted_edges_df,
                  scale=scale,
                  index_to_nodes_dict=index_to_nodes_dict,
              )
          )
      else:
          raise RuntimeError(
              "UMAP has not been run, run g.umap(...) first"
          )
  
      # write new res._edges df
      res = self._bind_xy_from_umap(
          res, kind, encode_position=True, encode_weight=True, play=0
      )
  
      if not inplace:
          return res
  
imports: import copy
  from time import time
  from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union
  from inspect import getmodule
  import pandas
  from .None import constants
  from .constants import CUML, UMAP_LEARN
  from .feature_utils import FeatureMixin, Literal, XSymbolic, YSymbolic, prune_weighted_edges_df_and_relabel_nodes, resolve_feature_engine
  from .PlotterBase import Plottable, WeakValueDictionary
  from .util import check_set_memoize
  import logging
label_desc: Use image node_id 13 for calling the UMAPMixin obj's underlying member method code with example usage: obj.filter_weighted_edges(scale, index_to_nodes_dict, inplace, kind) and returns: res