code: def load_test_data(filename):
      with open(filename, "r") as f:
          data = json.load(f)
  
      # Parsing data
      if data["is_complex"]:
          data["x"] = np.asarray(data["x"][0]) + 1j * np.asarray(
              data["x"][1]
          )
          data["y"] = np.asarray(data["y"][0]) + 1j * np.asarray(
              data["y"][1]
          )
      else:
          data["x"] = np.asarray(data["x"][0])
          data["y"] = np.asarray(data["y"][0])
  
      if type(data["step_size"]) in [int, float]:
          data["step_size"] = [float(data["step_size"])]
  
      else:
          data["step_size"] = list(map(float, data["step_size"]))
  
      return data
  
file_path: jaxdf/tests/test_gradient_accuracy.py
imports: import json
  import os
  from typing import List
  import numpy
  import pytest
  from jax import numpy
  from jaxdf import FourierSeries
  from jaxdf.geometry import Domain
  from jaxdf.operators import gradient
label_desc: Use image node_id 2 for calling a global function with example usage: load_test_data(filename) and returns: data