code: def _build_indel_size_chart(data):
      """Create the indel size chart."""
      width = 400
      height = 100
      placeholder_height = (2 * height) + 20  # 2 charts, plus spacing
      title = "Biallelic indel size distribution"
      ordered_labels = ["Insertion", "Deletion"]
      indel_size_data = _integer_counts_to_histogram(data)
      indel_size_data["type"] = np.where(
          indel_size_data["s"] > 0, "Insertion", "Deletion"
      )
  
      indel_size_chart = _placeholder_for_empty_chart(
          "No biallelic indels",
          width=width,
          height=placeholder_height,
          title=title,
      )
  
      if not indel_size_data.empty:
          indels_linear = (
              alt.Chart(indel_size_data)
              .mark_bar()
              .encode(
                  x=alt.X("s", title="size"),
                  x2="e",
                  y=alt.Y(
                      "c", title="Count", axis=alt.Axis(format="s")
                  ),
                  color=alt.Color(
                      "type",
                      sort=ordered_labels,
                      scale=alt.Scale(scheme="set1"),
                  ),
              )
              .properties(width=400, height=100, title=title)
              .interactive(bind_y=False)
          )
  
          indel_log = (
              alt.Chart(indel_size_data)
              .mark_bar()
              .encode(
                  x=alt.X("s", title="size"),
                  x2="e",
                  y=alt.Y(
                      "c",
                      title="Count",
                      axis=alt.Axis(format="s"),
                      scale=alt.Scale(type="log", base=10),
                  ),
                  color=alt.Color(
                      "type",
                      sort=ordered_labels,
                      scale=alt.Scale(scheme="set1"),
                  ),
              )
              .properties(width=400, height=100)
              .interactive(bind_y=False)
          )
  
          indel_size_chart = alt.vconcat(
              indels_linear, indel_log
          ).resolve_scale(color="shared")
      return indel_size_chart
  
imports: import io
  import json
  import os
  import altair
  import numpy
  import pandas
  import tensorflow
label_desc: Use image node_id 10 for calling a global function with example usage: _build_indel_size_chart(data) and returns: indel_size_chart