code: def hydrate_graph(
      res,
      new_nodes,
      new_edges,
      node,
      src,
      dst,
      new_emb,
      new_features,
      new_targets,
  ):
      # #########################################################
      g = res.nodes(new_nodes, node).edges(new_edges, src, dst)
  
      # TODO this needs more work since edgelist_to_weighted_adjacency produces non square matrices (since infer_graph will add new nodes)
      # g._weighted_adjacency = edgelist_to_weighted_adjacency(g)
      g._node_embedding = new_emb
      g._node_features = new_features
      g._node_targets = new_targets
      g = g.settings(url_params={"play": 0})
      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 7 for calling a global function with example usage: hydrate_graph(res, new_nodes, new_edges, node, src, dst, new_emb, new_features, new_targets) and returns: g