code: def test_graph_constructor(self):
      g = (
          SGraph()
          .add_vertices(self.vertices, "vid")
          .add_edges(self.edges, "src_id", "dst_id")
      )
      g2 = SGraph(g.vertices, g.edges)
      g3 = SGraph(
          g.vertices,
          g.edges,
          src_field="__dst_id",
          dst_field="__src_id",
      )  # flip around src and dst
      assert_frame_equal(
          g.vertices.to_dataframe()
          .sort_values("__id")
          .reset_index(drop=True),
          g2.vertices.to_dataframe()
          .sort_values("__id")
          .reset_index(drop=True),
      )
      assert_frame_equal(
          g.edges.to_dataframe()
          .sort_values(["__src_id", "__dst_id"])
          .reset_index(drop=True),
          g2.edges.to_dataframe()
          .sort_values(["__src_id", "__dst_id"])
          .reset_index(drop=True),
      )
      self.assertRaises(
          ValueError,
          lambda: SGraph(SFrame(self.vertices), SFrame(self.edges)),
      )
      self.assertRaises(
          ValueError,
          lambda: SGraph(
              SFrame(self.vertices),
              SFrame(self.edges),
              "vid",
              "__src_id",
              "__dst_id",
          ),
      )
      self.assertRaises(
          ValueError,
          lambda: SGraph(
              SFrame(self.vertices),
              SFrame(self.edges),
              vid_field=None,
              src_field="src_id",
              dst_field="dst_id",
          ),
      )
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from ..data_structures.sgraph import SGraph, Vertex, Edge, load_sgraph
  from ..data_structures.sframe import SFrame
  from .None import util
  import pandas
  from pandas.util.testing import assert_frame_equal
  import numpy
  import unittest
  import tempfile
  import json
  import os
  import sys
  import pytest
label_desc: Use image node_id 3 for calling the GraphTests obj's underlying member method code with example usage: obj.test_graph_constructor() without return types