code: def test_find_in_ancillary():
      """Test finding a dataset in ancillary variables."""
      from satpy.utils import find_in_ancillary
  
      index_finger = xr.DataArray(
          data=np.arange(25).reshape(5, 5),
          dims=("y", "x"),
          attrs={"name": "index-finger"},
      )
      ring_finger = xr.DataArray(
          data=np.arange(25).reshape(5, 5),
          dims=("y", "x"),
          attrs={"name": "ring-finger"},
      )
  
      hand = xr.DataArray(
          data=np.arange(25).reshape(5, 5),
          dims=("y", "x"),
          attrs={
              "name": "hand",
              "ancillary_variables": [
                  index_finger,
                  index_finger,
                  ring_finger,
              ],
          },
      )
  
      assert find_in_ancillary(hand, "ring-finger") is ring_finger
      with pytest.raises(
          ValueError,
          match=(
              "Expected exactly one dataset named index-finger in "
              "ancillary variables for dataset 'hand', found 2"
          ),
      ):
          find_in_ancillary(hand, "index-finger")
      with pytest.raises(
          ValueError,
          match=(
              "Could not find dataset named thumb in "
              "ancillary variables for dataset 'hand'"
          ),
      ):
          find_in_ancillary(hand, "thumb")
  
imports: from __future__ import annotations
  import datetime
  import logging
  import typing
  import unittest
  import warnings
  from math import sqrt
  from unittest import mock
  import dask.array
  import numpy
  import pytest
  import xarray
  from satpy.tests.utils import xfail_skyfield_unstable_numpy2
  from satpy.utils import angle2xyz, get_legacy_chunk_size, get_satpos, import_error_helper, lonlat2xyz, proj_units_to_meters, xyz2angle, xyz2lonlat
label_desc: Use image node_id 20 for calling a global function with example usage: test_find_in_ancillary() without return types