code: def get_graphistry_from_search(
      search_term, src, dst, node_col, edf, ndf
  ):
      """
          Helper function to get subgraph from a search term (a node) located in edges dataframe
      :param search_term: Note this retrieves all nodes that have `search_term` in it -- ie, not strict matches
      :param src: source node
      :param dst: destination node
      :param node_col: node column
      :param edf: edges dataframe
      :param ndf: nodes dataframe
      :return: graphistry instance
      """
      tdf = get_nearest(search_term, src, dst, edf)
      gcols = pd.concat(
          [tdf[dst], tdf[src]], axis=0
      )  # get all node entries that show up in edge graph
      ntdf = ndf[ndf[node_col].isin(gcols)]
      g = graphistry.edges(tdf, src, dst).nodes(ntdf, node_col)
      return g
  
file_path: pygraphistry/graphistry/ai_utils.py
imports: import pandas
  import numpy
  import graphistry
  from .constants import DISTANCE, WEIGHT, BATCH
  from logging import getLogger
label_desc: Use image node_id 3 for calling a global function with example usage: get_graphistry_from_search(search_term, src, dst, node_col, edf, ndf) and returns: g