code: def test_xarray_time():
      xarray = pytest.importorskip("xarray")
  
      t = {"time": t0}
      ds = xarray.Dataset(t)
      assert str2dt(ds["time"]) == t0
  
      t2 = {"time": [t0, t0]}
      ds = xarray.Dataset(t2)
      assert (str2dt(ds["time"]) == t0).all()
  
file_path: pymap3d/src/pymap3d/tests/test_time.py
imports: from datetime import datetime
  import pymap3d.sidereal
  import pytest
  from pymap3d.timeconv import str2dt
  from pytest import approx
label_desc: Use image node_id 4 for calling a global function with example usage: test_xarray_time() without return types