code: def produce_require_dict(js_dependencies, js_host) -> dict:
      confs, libraries = [], []
      for name in js_dependencies.items:
          if name.startswith("https://api.map.baidu.com"):
              confs.append(
                  "'baidu_map_api{}':'{}'".format(len(name), name)
              )
              libraries.append("'baidu_map_api{}'".format(len(name)))
          if name in FILENAMES:
              f, _ = FILENAMES[name]
              confs.append("'{}':'{}{}'".format(name, js_host, f))
              libraries.append("'{}'".format(name))
          else:
              for url, files in EXTRA.items():
                  if name in files:
                      f, _ = files[name]
                      confs.append("'{}':'{}{}'".format(name, url, f))
                      libraries.append("'{}'".format(name))
                      break
      return dict(config_items=confs, libraries=libraries)
  
file_path: pyecharts/pyecharts/commons/utils.py
imports: import re
  from ..datasets import EXTRA, FILENAMES
label_desc: Use image node_id 1 for calling a global function with example usage: produce_require_dict(js_dependencies, js_host) and returns: dict