code: def flatten_edge_dict_adder(
      edges: List,
      edges_hits: Set[str],
      item: dict,
      src_col: str = "src",
      dst_col: str = "dst",
  ):
      """
      Return item when added as fresh
      """
  
      # Neptune elementMap(): skip for now as gives id/label but not props
      # if ('IN' in item) and isinstance(item['IN'], dict):
      #    flatten_vertex_dict_adder(nodes, nodes_hits, item['IN'])
      # if ('OUT' in item) and isinstance(item['OUT'], dict):
      #    flatten_vertex_dict_adder(nodes, nodes_hits, item['OUT'])
  
      id = None
      if "T.id" in item:
          id = item["T.id"]
      elif "id" in item:
          id = item["id"]
      if id is None or (id not in edges_hits):
          d = flatten_edge_dict(item, src_col, dst_col)
          edges.append(d)
          if id is not None:
              edges_hits.add(id)
          return d
      return None
  
imports: from typing import Any, Callable, Iterable, List, Optional, Set, Union, TYPE_CHECKING
  import os, pandas
  from .Plottable import Plottable
  from .util import setup_logger
label_desc: Use image node_id 14 for calling a global function with example usage: flatten_edge_dict_adder(edges, edges_hits, item, src_col, dst_col) and returns: None, d