code: def test_graph_base_v2(fake_writer):
      with open(
          os.path.join("test/fixtures", "les-miserables.json"),
          "r",
          encoding="utf-8",
      ) as f:
          j = json.load(f)
          nodes = j["nodes"]
          links = j["links"]
          categories = j["categories"]
  
      categories = [
          opts.GraphCategory(name=d.get("name")) for d in categories
      ]
  
      c = (
          Graph(init_opts=opts.InitOpts(width="1000px", height="600px"))
          .add(
              "",
              nodes=nodes,
              links=links,
              categories=categories,
              layout="circular",
              is_rotate_label=True,
              linestyle_opts=opts.LineStyleOpts(
                  color="source", curve=0.3
              ),
              label_opts=opts.LabelOpts(position="right"),
          )
          .set_global_opts(
              title_opts=opts.TitleOpts(title="Graph-Les Miserables"),
              legend_opts=opts.LegendOpts(
                  orient="vertical", pos_left="2%", pos_top="20%"
              ),
          )
      )
      c.render()
      _, content = fake_writer.call_args[0]
      assert_equal(c.theme, "white")
      assert_equal(c.renderer, "canvas")
  
file_path: pyecharts/test/test_graph.py
imports: import os
  import json
  from unittest.mock import patch
  from nose.tools import assert_equal, assert_in
  from pyecharts import options
  from pyecharts.charts import Graph
label_desc: Use image node_id 3 for calling a global function with example usage: test_graph_base_v2(fake_writer) without return types