code: def test_implicit_coords_xarray(self):
      xr = pytest.importorskip("xarray")
      data = xr.DataArray([[1, 2, 3], [4, 5, 6]], dims=("y", "x"))
      with pm.Model() as pmodel:
          with pytest.warns(DeprecationWarning):
              pm.ConstantData(
                  "observations",
                  data,
                  dims=("x", "y"),
                  export_index_as_coords=True,
              )
      assert "x" in pmodel.coords
      assert "y" in pmodel.coords
      assert pmodel.named_vars_to_dims == {"observations": ("x", "y")}
      assert tuple(pmodel.coords["x"]) == tuple(
          data.coords["x"].to_numpy()
      )
      assert tuple(pmodel.coords["y"]) == tuple(
          data.coords["y"].to_numpy()
      )
  
imports: import io
  import itertools
  import re
  import cloudpickle
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor import shared
  from pytensor.tensor.variable import TensorVariable
  import pymc
  from pymc.data import is_minibatch
  from pymc.pytensorf import GeneratorOp, floatX
label_desc: Use image node_id 17 for calling the TestData obj's underlying member method code with example usage: obj.test_implicit_coords_xarray() without return types