code: def build_chart_url(names):
      params = {
          "chart_type": "line",
          "x": "Season",
          "y": json.dumps(["HR"]),
          "group": json.dumps(["name"]),
          "group_val": json.dumps([{"name": name} for name in names]),
      }
      return "/dtale/charts/1?{}".format(urllib.parse.urlencode(params))
  
imports: import json
  import os
  import pandas
  import requests
  import urllib
  from bs4 import BeautifulSoup
  from flask import render_template, request
  from logging import getLogger
  from dtale.app import build_app, get_instance
  from dtale.global_state import cleanup
  from dtale.views import startup
label_desc: Use image node_id 7 for calling a global function with example usage: build_chart_url(names) and returns: str