class_docstr: Uses spm to reslice a volume to a target image space or to a provided
  voxel size and bounding box
  
  Examples
  --------
  
  >>> import nipype.interfaces.spm.utils as spmu
  >>> r2ref = spmu.ResliceToReference()
  >>> r2ref.inputs.in_files = 'functional.nii'
  >>> r2ref.inputs.target = 'structural.nii'
  >>> r2ref.run() # doctest: +SKIP
class_docstr_tok: ["Uses","spm","to","reslice","a","volume","to","a","target","image","space","or","to","a","provided","voxel","size","and","bounding","box","Examples","--","--","--","--",">",">",">","import","nipype.interfaces.spm.utils","as","spmu",">",">",">","r2ref","=","spmu.ResliceToReference","(",")",">",">",">","r2ref.inputs.in_files","=","'functional.nii'",">",">",">","r2ref.inputs.target","=","'structural.nii'",">",">",">","r2ref.run","(",")","#","doctest",":","+SKIP"]
docstr: Convert input to appropriate format for spm
docstr_tok: ["Convert","input","to","appropriate","format","for","spm"]
code: def _format_arg(self, opt, spec, val):
      """Convert input to appropriate format for spm"""
      if opt == "in_files":
          return scans_for_fnames(ensure_list(val))
      if opt == "target":
          return scans_for_fname(ensure_list(val))
      if opt == "deformation":
          return np.array([simplify_list(val)], dtype=object)
      if opt == "deformation_field":
          return np.array([simplify_list(val)], dtype=object)
      return val
  
imports: import os
  import numpy
  from ...utils.filemanip import split_filename, fname_presuffix, ensure_list, simplify_list
  from ..base import TraitedSpec, isdefined, File, traits, OutputMultiPath, InputMultiPath
  from .base import SPMCommandInputSpec, SPMCommand, scans_for_fnames, scans_for_fname
label_desc: Use image node_id 1 for calling the ResliceToReference obj's underlying member method code with example usage: obj._format_arg(opt, spec, val) and returns: val, scans_for_fnames, scans_for_fname, np, np