code: def test_graphic_rect():
      rect = opts.GraphicRect(
          graphic_item={"item": 1},
          graphic_shape_opts={"shape": 1},
          graphic_basicstyle_opts={"opts": 1},
      )
      expected = {
          "type": "rect",
          "item": 1,
          "shape": 1,
          "style": {
              "opts": 1,
          },
      }
      assert_equal(expected, remove_key_with_none_value(rect.opts))
  
file_path: pyecharts/test/test_graphic.py
imports: import os
  import json
  from unittest.mock import patch
  from nose.tools import assert_equal, assert_in
  from pyecharts.commons.utils import remove_key_with_none_value
  from pyecharts import options
label_desc: Use image node_id 4 for calling a global function with example usage: test_graphic_rect() without return types