docstr: should create a structure model
docstr_tok: ["should","create","a","structure","model"]
code: def test_to_directed(self):
      """should create a structure model"""
  
      sm = StructureModel()
      edges = [(1, 2), (2, 1), (2, 3), (3, 4)]
      sm.add_edges_from(edges)
  
      dag = sm.to_directed()
      assert isinstance(dag, StructureModel)
      assert all(edge in dag.edges for edge in edges)
  
imports: import pytest
  from networkx.exception import NodeNotFound
  from causalnex.structure import StructureModel
label_desc: Use image node_id 6 for calling the TestStructureModel obj's underlying member method code with example usage: obj.test_to_directed() without return types