code: def date32_timeunit_spec():
      return json.loads(
          r"""
  {
    "$schema": "https://vega.github.io/schema/vega/v5.json",
    "autosize": {
      "type": "fit",
      "contains": "padding"
    },
    "background": "white",
    "padding": 5,
    "style": "cell",
    "data": [
      {
        "name": "dataframe",
        "url": "vegafusion+dataset://dataframe"
      },
      {
        "name": "data_0",
        "source": "dataframe",
        "transform": [
          {
            "type": "filter",
            "expr": "isValid(datum[\"GO_LIVE_MONTH\"])"
          },
          {
            "field": "GO_LIVE_MONTH",
            "type": "timeunit",
            "units": [
              "year",
              "month"
            ],
            "as": [
              "go_live_start",
              "go_live_end"
            ]
          },
          {
            "type": "stack",
            "groupby": [
              "go_live_start"
            ],
            "field": "PERCENT_GO_LIVES",
            "sort": {
              "field": [],
              "order": []
            },
            "as": [
              "percent_go_lives_start",
              "percent_go_lives_end"
            ],
            "offset": "normalize"
          },
          {
            "type": "formula",
            "expr": "datum['percent_go_lives_end']-datum['percent_go_lives_start']",
            "as": "percent_go_lives_delta"
          }
        ]
      },
      {
        "name": "data_1",
        "source": "data_0",
        "transform": [
          {
            "field": "go_live_start",
            "type": "timeunit",
            "units": [
              "year",
              "month"
            ],
            "as": [
              "go_live_start_start",
              "go_live_start_end"
            ]
          },
          {
            "type": "filter",
            "expr": "(isDate(datum[\"go_live_start_start\"]) || (isValid(datum[\"go_live_start_start\"]) && isFinite(+datum[\"go_live_start_start\"]))) && isValid(datum[\"percent_go_lives_start\"]) && isFinite(+datum[\"percent_go_lives_start\"])"
          }
        ]
      }
    ],
    "marks": [
      {
        "name": "layer_0_layer_0_layer_0_marks",
        "type": "rect",
        "clip": true,
        "style": [
          "bar"
        ],
        "from": {
          "data": "data_1"
        },
        "encode": {
          "update": {
            "fill": {
              "value": "#ff4c00"
            },
            "opacity": {
              "value": 1
            },
            "ariaRoleDescription": {
              "value": "bar"
            },
            "x": {
              "scale": "x",
              "field": "go_live_start_start"
            },
            "x2": {
              "scale": "x",
              "field": "go_live_end",
              "offset": -1
            },
            "y": {
              "scale": "y",
              "field": "percent_go_lives_start"
            },
            "y2": {
              "scale": "y",
              "field": "percent_go_lives_end"
            }
          }
        }
      }
    ],
    "scales": [
      {
        "name": "x",
        "type": "time",
        "domain": {
          "fields": [
            {
              "data": "data_1",
              "field": "go_live_start_start"
            },
            {
              "data": "data_1",
              "field": "go_live_end"
            }
          ]
        },
        "range": [
          0,
          {
            "signal": "width"
          }
        ]
      },
      {
        "name": "y",
        "type": "linear",
        "domain": {
          "fields": [
            {
              "data": "data_1",
              "field": "percent_go_lives_start"
            },
            {
              "data": "data_1",
              "field": "percent_go_lives_end"
            }
          ]
        },
        "range": [
          {
            "signal": "height"
          },
          0
        ],
        "nice": true,
        "zero": true
      }
    ]
  }
  
  """
      )
  
imports: import pandas
  import pytest
  from pandas import Timestamp, NaT
  import pyarrow
  import vegafusion
  import json
  import polars
  from datetime import date
  import decimal
  import base64
label_desc: Use image node_id 9 for calling a global function with example usage: date32_timeunit_spec() and returns: json