class_docstr: <<< WordCloud >>>
  
  Word cloud is to visually highlight the keywords that
  appear frequently in the text.
code: def add(
      self,
      series_name: str,
      data_pair: types.Sequence,
      *,
      shape: str = "circle",
      mask_image: types.Optional[str] = None,
      word_gap: types.Numeric = 20,
      word_size_range: types.Optional[types.Sequence] = None,
      rotate_step: types.Numeric = 45,
      pos_left: types.Optional[str] = None,
      pos_top: types.Optional[str] = None,
      pos_right: types.Optional[str] = None,
      pos_bottom: types.Optional[str] = None,
      width: types.Optional[str] = None,
      height: types.Optional[str] = None,
      is_draw_out_of_bound: bool = False,
      tooltip_opts: types.Tooltip = None,
      itemstyle_opts: types.ItemStyle = None,
      textstyle_opts: types.TextStyle = None,
      emphasis_shadow_blur: types.Optional[types.Numeric] = None,
      emphasis_shadow_color: types.Optional[str] = None,
  ):
      data = []
      for n, v in data_pair:
          data.append(
              {
                  "name": n,
                  "value": v,
                  "textStyle": {"color": gen_color()},
              }
          )
  
      word_size_range = word_size_range or (12, 60)
  
      _rmin, _rmax = -90, 90
      # 确保设置的形状有效，单词的旋转角度应该设置在 [-90, 90]
      if shape in SHAPES:
          _rmin = _rmax = 0
      else:
          shape = "circle"
  
      if mask_image is not None:
          shape = None
          mask_image = self._create_mask_image_variable(data=mask_image)
  
      self.options.get("series").append(
          {
              "type": ChartType.WORDCLOUD,
              "name": series_name,
              "shape": shape,
              "maskImage": mask_image,
              "rotationRange": [_rmin, _rmax],
              "rotationStep": rotate_step,
              "girdSize": word_gap,
              "sizeRange": word_size_range,
              "data": data,
              "tooltip": tooltip_opts,
              "itemStyle": itemstyle_opts,
              "left": pos_left,
              "right": pos_right,
              "top": pos_top,
              "bottom": pos_bottom,
              "width": width,
              "height": height,
              "drawOutOfBound": is_draw_out_of_bound,
              "textStyle": {
                  "normal": textstyle_opts,
                  "emphasis": {
                      "shadowBlur": emphasis_shadow_blur,
                      "shadowColor": emphasis_shadow_color,
                  },
              },
          }
      )
      return self
  
file_path: pyecharts/pyecharts/charts/basic_charts/wordcloud.py
imports: import base64
  import random
  from pathlib import Path
  from ...None import options
  from ...None import types
  from ...charts.chart import Chart
  from ...commons.utils import JsCode
  from ...exceptions import WordCloudMaskImageException
  from ...globals import ChartType
label_desc: Use image node_id 4 for calling the WordCloud obj's underlying member method code with example usage: obj.add(series_name, data_pair) and returns: self