input: Write a python function to compute the shortest path in a graph using NetworkX library.
  assert compute_shortest_path(['A', 'B', 'C', 'D', 'E'], 'A') == ['A', 'B', 'C', 'D', 'E']
  assert compute_shortest_path(['A', 'B', 'C'], 'A') == ['A', 'B', 'C']
  assert compute_shortest_path(['A', 'D'], 'A') == ['A', 'D']
output: import networkx as nx
  
  def compute_shortest_path(nodes, start_node):
      G = nx.Graph()
      G.add_nodes_from(nodes)
      for i in range(len(nodes) - 1):
          G.add_edge(nodes[i], nodes[i + 1])
      return list(nx.shortest_path(G, source=start_node))