code: def _compute_symmetric_split(source, atlas_niimg, names):
      """Handle 3D atlases when symmetric_split=True.
  
      Helper function for both fetch_atlas_juelich and
      fetch_atlas_harvard_oxford.
      """
      # The atlas_niimg should have been passed to
      # reorder_img such that the affine's diagonal
      # should be positive. This is important to
      # correctly split left and right hemispheres.
      assert atlas_niimg.affine[0, 0] > 0
      atlas_data = get_data(atlas_niimg)
      labels = np.unique(atlas_data)
      # Build a mask of both halves of the brain
      middle_ind = (atlas_data.shape[0]) // 2
      # Split every zone crossing the median plane into two parts.
      left_atlas = atlas_data.copy()
      left_atlas[middle_ind:] = 0
      right_atlas = atlas_data.copy()
      right_atlas[:middle_ind] = 0
  
      if source == "Juelich":
          for idx, name in enumerate(names):
              if name.endswith("L"):
                  names[idx] = re.sub(r" L$", "", name)
                  names[idx] = f"Left {name}"
              if name.endswith("R"):
                  names[idx] = re.sub(r" R$", "", name)
                  names[idx] = f"Right {name}"
  
      new_label = 0
      new_atlas = atlas_data.copy()
      # Assumes that the background label is zero.
      new_names = [names[0]]
      for label, name in zip(labels[1:], names[1:]):
          new_label += 1
          left_elements = (left_atlas == label).sum()
          right_elements = (right_atlas == label).sum()
          n_elements = float(left_elements + right_elements)
          if (
              left_elements / n_elements < 0.05
              or right_elements / n_elements < 0.05
          ):
              new_atlas[atlas_data == label] = new_label
              new_names.append(name)
              continue
          new_atlas[left_atlas == label] = new_label
          new_names.append(f"Left {name}")
          new_label += 1
          new_atlas[right_atlas == label] = new_label
          new_names.append(f"Right {name}")
      return new_atlas, new_names
  
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 9 for calling a global function with example usage: _compute_symmetric_split(source, atlas_niimg, names) and returns: new_atlas,  new_names