code: def decode_base64(data: str) -> bytes:
      """Decode base64, padding being optional.
  
      :param data: Base64 data as an ASCII byte string
      :returns: The decoded byte string.
      """
      missing_padding = len(data) % 4
      if missing_padding != 0:
          data += "=" * (4 - missing_padding)
      return base64.decodebytes(data.encode("utf-8"))
  
file_path: pyecharts/pyecharts/render/snapshot.py
imports: import base64
  import codecs
  import logging
  import os
  from io import BytesIO
  from ..types import Any
label_desc: Use image node_id 2 for calling a global function with example usage: decode_base64(data) and returns: base64