code: def test_subcharts_different_data(method, data):
      func = getattr(alt, method)
  
      point = alt.Chart(data).mark_point().encode(x="x:Q", y="y:Q")
      otherdata = (
          alt.Chart("data.csv").mark_point().encode(x="x:Q", y="y:Q")
      )
      nodata = alt.Chart().mark_point().encode(x="x:Q", y="y:Q")
  
      chart1 = func(point, otherdata)
      assert chart1.data is alt.Undefined
      assert getattr(chart1, method)[0].data is data
  
      chart2 = func(point, nodata)
      assert chart2.data is alt.Undefined
      assert getattr(chart2, method)[0].data is data
  
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 35 for calling a global function with example usage: test_subcharts_different_data(method, data) without return types