class_docstr: Test case for CF writer.
docstr: Test ancillary_variables cited each other.
docstr_tok: ["Test","ancillary_variables","cited","each","other","."]
code: def test_ancillary_variables(self):
      """Test ancillary_variables cited each other."""
      from satpy.tests.utils import make_dataid
  
      scn = Scene()
      start_time = datetime(2018, 5, 30, 10, 0)
      end_time = datetime(2018, 5, 30, 10, 15)
      da = xr.DataArray(
          [1, 2, 3],
          attrs=dict(
              start_time=start_time,
              end_time=end_time,
              prerequisites=[make_dataid(name="hej")],
          ),
      )
      scn["test-array-1"] = da
      scn["test-array-2"] = da.copy()
      scn["test-array-1"].attrs["ancillary_variables"] = [
          scn["test-array-2"]
      ]
      scn["test-array-2"].attrs["ancillary_variables"] = [
          scn["test-array-1"]
      ]
      with TempFile() as filename:
          scn.save_datasets(filename=filename, writer="cf")
          with xr.open_dataset(filename) as f:
              assert (
                  f["test-array-1"].attrs["ancillary_variables"]
                  == "test-array-2"
              )
              assert (
                  f["test-array-2"].attrs["ancillary_variables"]
                  == "test-array-1"
              )
  
imports: import os
  import tempfile
  import warnings
  from datetime import datetime
  import numpy
  import pytest
  import xarray
  from packaging.version import Version
  from satpy import Scene
  from satpy.tests.utils import make_dsq
  from satpy.writers.cf_writer import _get_backend_versions
label_desc: Use image node_id 8 for calling the TestCFWriter obj's underlying member method code with example usage: obj.test_ancillary_variables() without return types