code: def knowledge_graph():
      nodes = ["a", "b", "c", "d"]
  
      edge_counter = 0
  
      def edge_df(*elements):
          nonlocal edge_counter
          end = edge_counter + len(elements)
          index = range(edge_counter, end)
          edge_counter = end
          return pd.DataFrame(
              elements, columns=["source", "target"], index=index
          )
  
      edges = {
          "W": edge_df(("a", "b")),
          "X": edge_df(("a", "b"), ("b", "c")),
          "Y": edge_df(("b", "a")),
          "Z": edge_df(("d", "b")),
      }
  
      return StellarDiGraph(
          nodes=pd.DataFrame(index=nodes), edges=edges
      )
  
imports: from stellargraph import StellarGraph, StellarDiGraph, IndexedArray
  import networkx
  import pandas
  import numpy
  import random
  import pytest
label_desc: Use image node_id 14 for calling a global function with example usage: knowledge_graph() and returns: StellarDiGraph, pd