code: def _test_atlas_instance_should_match_data(atlas, is_symm):
      assert (
          Path(atlas.filename).exists()
          and Path(atlas.filename).is_absolute()
      )
      assert isinstance(atlas.maps, nibabel.Nifti1Image)
      assert isinstance(atlas.labels, list)
  
      expected_atlas_labels = (
          [
              "Background",
              "Left R1",
              "Right R1",
              "Left R2",
              "Right R2",
              "Left R3",
              "Right R3",
          ]
          if is_symm
          else ["Background", "R1", "R2", "R3"]
      )
      assert atlas.labels == expected_atlas_labels
  
imports: import itertools
  import os
  import re
  from pathlib import Path
  import nibabel
  import numpy
  import pandas
  import pytest
  from numpy.testing import assert_array_equal
  from nilearn._utils import data_gen
  from nilearn._utils.testing import serialize_niimg
  from nilearn.conftest import _rng
  from nilearn.datasets import atlas
  from nilearn.datasets._utils import fetch_files
  from nilearn.datasets.tests._testing import dict_to_archive
  from nilearn.image import get_data
label_desc: Use image node_id 4 for calling a global function with example usage: _test_atlas_instance_should_match_data(atlas, is_symm) without return types