code: def xarray_data():
      np.random.seed(123)
  
      times = pd.date_range("2000-01-01", "2001-12-31", name="time")
      annual_cycle = np.sin(
          2 * np.pi * (times.dayofyear.values / 365.25 - 0.28)
      )
  
      base = 10 + 15 * annual_cycle.reshape(-1, 1)
      tmin_values = base + 3 * np.random.randn(annual_cycle.size, 3)
      tmax_values = (
          base + 10 + 3 * np.random.randn(annual_cycle.size, 3)
      )
  
      return xr.Dataset(
          {
              "tmin": (("time", "location"), tmin_values),
              "tmax": (("time", "location"), tmax_values),
          },
          {"time": times, "location": ["IA", "IN", "IL"]},
      )
  
file_path: dtale/tests/dtale/test_xarray.py
imports: import json
  import numpy
  import pandas
  import pytest
  import xarray
  from six import PY3
  from tests.dtale.test_views import app, URL
label_desc: Use image node_id 1 for calling a global function with example usage: xarray_data() and returns: xr