code: def _make_chart_type(chart_type):
      data = pd.DataFrame(
          {
              "x": [28, 55, 43, 91, 81, 53, 19, 87],
              "y": [43, 91, 81, 53, 19, 87, 52, 28],
              "color": list("AAAABBBB"),
          }
      )
      base = (
          alt.Chart(data)
          .mark_point()
          .encode(
              x="x",
              y="y",
              color="color",
          )
      )
  
      if chart_type in ["layer", "hconcat", "vconcat", "concat"]:
          func = getattr(alt, chart_type)
          return func(base.mark_square(), base.mark_circle())
      elif chart_type == "facet":
          return base.facet("color")
      elif chart_type == "facet_encoding":
          return base.encode(facet="color")
      elif chart_type == "repeat":
          return base.encode(
              alt.X(alt.repeat(), type="quantitative")
          ).repeat(["x", "y"])
      elif chart_type == "chart":
          return base
      else:
          raise ValueError(
              "chart_type='{}' is not recognized".format(chart_type)
          )
  
imports: import io
  import json
  import operator
  import os
  import pathlib
  import tempfile
  import jsonschema
  import pytest
  import pandas
  import altair.vegalite.v5
label_desc: Use image node_id 2 for calling a global function with example usage: _make_chart_type(chart_type) and returns: func, base, base, base, base