def get_aparc_aseg(files):
 for name in files:
  if ('aparc+aseg' in name):
   return name
 raise ValueError('aparc+aseg.mgz not found')

def get_aparc_aseg ( files ) : for name in files : if ( 'aparc+aseg' in name ) : return name raise ValueError ( 'aparc+aseg.mgz not found' )
return the aparc+aseg .