code: def fetch_atlas_harvard_oxford(
      atlas_name,
      data_dir=None,
      symmetric_split=False,
      resume=True,
      verbose=1,
  ):
      """Load Harvard-Oxford parcellations from FSL.
  
      This function downloads Harvard Oxford atlas packaged from FSL 5.0
      and stores atlases in NILEARN_DATA folder in home directory.
  
      This function can also load Harvard Oxford atlas from your local directory
      specified by your FSL installed path given in `data_dir` argument.
      See documentation for details.
  
      .. note::
  
          For atlases 'cort-prob-1mm', 'cort-prob-2mm', 'cortl-prob-1mm',
          'cortl-prob-2mm', 'sub-prob-1mm', and 'sub-prob-2mm', the function
          returns a :term:`Probabilistic atlas`, and the
          :class:`~nibabel.nifti1.Nifti1Image` returned is 4D, with shape
          ``(182, 218, 182, 48)``.
          For :term:`deterministic atlases<Deterministic atlas>`, the
          :class:`~nibabel.nifti1.Nifti1Image` returned is 3D, with
          shape ``(182, 218, 182)`` and 48 regions (+ background).
  
      Parameters
      ----------
      atlas_name : :obj:`str`
          Name of atlas to load. Can be:
          "cort-maxprob-thr0-1mm", "cort-maxprob-thr0-2mm",
          "cort-maxprob-thr25-1mm", "cort-maxprob-thr25-2mm",
          "cort-maxprob-thr50-1mm", "cort-maxprob-thr50-2mm",
          "cort-prob-1mm", "cort-prob-2mm",
          "cortl-maxprob-thr0-1mm", "cortl-maxprob-thr0-2mm",
          "cortl-maxprob-thr25-1mm", "cortl-maxprob-thr25-2mm",
          "cortl-maxprob-thr50-1mm", "cortl-maxprob-thr50-2mm",
          "cortl-prob-1mm", "cortl-prob-2mm",
          "sub-maxprob-thr0-1mm", "sub-maxprob-thr0-2mm",
          "sub-maxprob-thr25-1mm", "sub-maxprob-thr25-2mm",
          "sub-maxprob-thr50-1mm", "sub-maxprob-thr50-2mm",
          "sub-prob-1mm", "sub-prob-2mm".
      %(data_dir)s
          Optionally, it can also be a FSL installation directory (which is
          dependent on your installation).
          Example, if FSL is installed in ``/usr/share/fsl/`` then
          specifying as '/usr/share/' can get you the Harvard Oxford atlas
          from your installed directory. Since we mimic the same root directory
          as FSL to load it easily from your installation.
  
      symmetric_split : :obj:`bool`, default=False
          If ``True``, lateralized atlases of cort or sub with maxprob will be
          returned. For subcortical types (``sub-maxprob``), we split every
          symmetric region in left and right parts. Effectively doubles the
          number of regions.
  
          .. note::
              Not implemented
              for full :term:`Probabilistic atlas` (*-prob-* atlases).
  
      %(resume)s
      %(verbose)s
  
      Returns
      -------
      data : :class:`sklearn.utils.Bunch`
          Dictionary-like object, keys are:
  
              - 'maps': :obj:`str`, path to nifti file containing the
                atlas :class:`~nibabel.nifti1.Nifti1Image`. It is a 4D image
                if a :term:`Probabilistic atlas` is requested, and a 3D image
                if a :term:`maximum probability atlas<Deterministic atlas>` is
                requested. In the latter case, the image contains integer
                values which can be interpreted as the indices in the list
                of labels.
  
                  .. note::
  
                      For some atlases, it can be the case that some regions
                      are empty. In this case, no :term:`voxels<voxel>` in the
                      map are assigned to these regions. So the number of
                      unique values in the map can be strictly smaller than the
                      number of region names in ``labels``.
  
              - 'labels': :obj:`list` of :obj:`str`, list of labels for the
                regions in the atlas.
              - 'filename': Same as 'maps', kept for backward
                compatibility only.
              - 'description': :obj:`str`, description of the atlas.
  
      See Also
      --------
      nilearn.datasets.fetch_atlas_juelich
  
      """
      atlases = [
          "cort-maxprob-thr0-1mm",
          "cort-maxprob-thr0-2mm",
          "cort-maxprob-thr25-1mm",
          "cort-maxprob-thr25-2mm",
          "cort-maxprob-thr50-1mm",
          "cort-maxprob-thr50-2mm",
          "cort-prob-1mm",
          "cort-prob-2mm",
          "cortl-maxprob-thr0-1mm",
          "cortl-maxprob-thr0-2mm",
          "cortl-maxprob-thr25-1mm",
          "cortl-maxprob-thr25-2mm",
          "cortl-maxprob-thr50-1mm",
          "cortl-maxprob-thr50-2mm",
          "cortl-prob-1mm",
          "cortl-prob-2mm",
          "sub-maxprob-thr0-1mm",
          "sub-maxprob-thr0-2mm",
          "sub-maxprob-thr25-1mm",
          "sub-maxprob-thr25-2mm",
          "sub-maxprob-thr50-1mm",
          "sub-maxprob-thr50-2mm",
          "sub-prob-1mm",
          "sub-prob-2mm",
      ]
      if atlas_name not in atlases:
          atlases = "\n".join(atlases)
          raise ValueError(
              f"Invalid atlas name: {atlas_name}. "
              f"Please choose an atlas among:\n{atlases}"
          )
      is_probabilistic = "-prob-" in atlas_name
      if is_probabilistic and symmetric_split:
          raise ValueError(
              "Region splitting not supported for probabilistic atlases"
          )
      (
          atlas_img,
          atlas_filename,
          names,
          is_lateralized,
      ) = _get_atlas_data_and_labels(
          "HarvardOxford",
          atlas_name,
          symmetric_split=symmetric_split,
          data_dir=data_dir,
          resume=resume,
          verbose=verbose,
      )
  
      fdescr = get_dataset_descr("harvard_oxford")
  
      atlas_niimg = check_niimg(atlas_img)
      if not symmetric_split or is_lateralized:
          return Bunch(
              filename=atlas_filename,
              maps=atlas_niimg,
              labels=names,
              description=fdescr,
          )
  
      new_atlas_data, new_names = _compute_symmetric_split(
          "HarvardOxford", atlas_niimg, names
      )
      new_atlas_niimg = new_img_like(
          atlas_niimg, new_atlas_data, atlas_niimg.affine
      )
      return Bunch(
          filename=atlas_filename,
          maps=new_atlas_niimg,
          labels=new_names,
          description=fdescr,
      )
  
imports: import json
  import os
  import re
  import shutil
  import warnings
  import xml.etree.ElementTree
  from pathlib import Path
  from tempfile import mkdtemp
  import nibabel
  import numpy
  import pandas
  from sklearn.utils import Bunch
  from .._utils import check_niimg, fill_doc
  from ..image import get_data, new_img_like, reorder_img
  from ._utils import fetch_files, get_dataset_descr, get_dataset_dir
label_desc: Use image node_id 4 for calling a global function with example usage: fetch_atlas_harvard_oxford(atlas_name, data_dir, symmetric_split, resume, verbose) and returns: Bunch, Bunch