code: def render(
      tables: List[alt.Data],
      *,
      names: List[str],
      is_independent: bool,
      levels=5,
      alpha=0.6,
      height: int,
      width: int,
      height_minimap: int,
  ):
      zoom = alt.selection_interval(encodings=["x", "y"])
  
      minimaps = None
      for i, t in enumerate(tables):
          z = zoom if i == 0 else None
          minimap = _render_density(
              t,
              name="",
              x_name="",
              line_color=TABLEAU_10[i % 10],
              range_color=TABLEAU_10[i % 10],
              levels=levels,
              alpha=alpha,
              selection=z,
          )
          if minimaps is None:
              minimaps = minimap
          else:
              minimaps += minimap
  
      details = None
      for i, t in enumerate(tables):
          detail = _render_density(
              t,
              name=names[i] if len(names) == 1 else "",
              x_name="Step",
              line_color=TABLEAU_10[i % 10],
              range_color=TABLEAU_10[i % 10],
              levels=levels,
              alpha=alpha,
              x_scale=alt.Scale(
                  domain={"selection": zoom.name, "encoding": "x"}
              ),
              y_scale=alt.Scale(
                  domain={"selection": zoom.name, "encoding": "y"}
              ),
          )
          if details is None:
              details = detail
          elif is_independent:
              details = alt.layer(details, detail).resolve_scale(
                  y="independent"
              )
          else:
              details += detail
  
      colors = alt.Data(
          values=[
              {"idx": i, "name": name} for i, name in enumerate(names)
          ]
      )
      legend = (
          alt.Chart(colors)
          .mark_rect()
          .encode(
              alt.Y(
                  "name:N",
                  sort=alt.EncodingSortField(
                      field="i", order="ascending"
                  ),
                  axis=alt.Axis(
                      orient="right",
                      titleX=7,
                      titleY=-2,
                      titleAlign="left",
                      titleAngle=0,
                  ),
                  title="",
              ),
              alt.Color(
                  "idx:O",
                  scale=alt.Scale(
                      domain=list(range(len(tables))), range=TABLEAU_10
                  ),
                  legend=None,
              ),
          )
      )
  
      minimaps = minimaps.properties(width=width, height=height_minimap)
      details = details.properties(width=width, height=height)
  
      if len(names) == 1:
          return details & minimaps
      else:
          return (details & minimaps) | legend
  
imports: from typing import List
  import altair
  from labml.internal.analytics.altair.utils import TABLEAU_10
label_desc: Use image node_id 3 for calling a global function with example usage: render(tables) and returns: unknown, unknown