code: def get_adjacency_matrix(graph: nx.DiGraph, *args, **kwargs):
      """
      Get adjacency matrix from the networkx graph
  
      """
      return nx.convert_matrix.to_numpy_array(graph, *args, **kwargs)
  
imports: import itertools
  import logging
  import re
  from abc import abstractmethod
  from typing import Any, List, Protocol
  import networkx
  from networkx.algorithms.dag import has_cycle
  from dowhy.utils.api import parse_state
  from dowhy.utils.graph_operations import daggity_to_dot
label_desc: Use image node_id 18 for calling a global function with example usage: get_adjacency_matrix(graph) and returns: nx