code: def test_spark_make_histograms(spark_context):
      names = [
          "age",
          "company",
          "eyeColor",
          "gender",
          "latitude",
          "longitude",
          "transaction",
      ]
  
      pytest.latitude_longitude["data"]["name"] = "'latitude:longitude'"
      pytest.latitude_longitude["data"]["bins:name"] = "unit_func"
  
      spark_df = spark_context.createDataFrame(pytest.test_df)
  
      # test make_histograms() function call with spark df
      current_hists = make_histograms(
          spark_df,
          features=[
              "date",
              "isActive",
              "age",
              "eyeColor",
              "gender",
              "company",
              "latitude",
              "longitude",
              ["isActive", "age"],
              ["latitude", "longitude"],
              "transaction",
          ],
          bin_specs={
              "transaction": {"num": 100, "low": -2000, "high": 2000},
              "longitude": {"bin_width": 5.0, "bin_offset": 0.0},
              "latitude": {"bin_width": 5.0, "bin_offset": 0.0},
          },
          binning="unit",
      )
  
      # backwards compatibility
      for name in names:
          v1 = deepcopy(getattr(pytest, name))
          v1["data"]["name"] = f"'{name}'"
  
          v2 = deepcopy(getattr(pytest, name))
          v2["data"]["name"] = f"b'{name}'"
  
          output = current_hists[name].toJson()
          assert output in (v1, v2)
  
file_path: popmon/tests/popmon/spark/test_spark.py
imports: from copy import deepcopy
  from pathlib import Path
  import pandas
  import pytest
  from popmon.hist.filling import make_histograms
  from popmon.pipeline.metrics import df_stability_metrics
label_desc: Use image node_id 3 for calling a global function with example usage: test_spark_make_histograms(spark_context) without return types