code: def test_calendar_setting(fake_writer):
      begin = datetime.date(2017, 1, 1)
      end = datetime.date(2017, 12, 31)
      data = [
          [
              str(begin + datetime.timedelta(days=i)),
              random.randint(1000, 25000),
          ]
          for i in range((end - begin).days + 1)
      ]
  
      c = Calendar().add(
          "",
          data,
          calendar_opts=opts.CalendarOpts(
              range_="2017",
              cell_size=15,
              daylabel_opts=opts.CalendarDayLabelOpts(name_map="cn"),
              monthlabel_opts=opts.CalendarMonthLabelOpts(
                  name_map="cn"
              ),
          ),
          visualmap_opts=opts.VisualMapOpts(
              max_=20000,
              min_=500,
              orient="horizontal",
              is_piecewise=True,
              pos_top="230px",
              pos_left="100px",
          ),
      )
      c.render()
      _, content = fake_writer.call_args[0]
      assert_in("cellSize", content)
      assert_in("dayLabel", content)
      assert_in("monthLabel", content)
      assert_in("visualMap", content)
  
imports: import datetime
  import random
  from unittest.mock import patch
  from nose.tools import assert_equal, assert_in
  from pyecharts import options
  from pyecharts.charts import Calendar
label_desc: Use image node_id 2 for calling a global function with example usage: test_calendar_setting(fake_writer) without return types