def _fs_home_problem(fs_home):
 if (fs_home is None):
  return 'FREESURFER_HOME is not set.'
 elif (not os.path.exists(fs_home)):
  return ('FREESURFER_HOME (%s) does not exist.' % fs_home)
 else:
  test_dir = os.path.join(fs_home, 'subjects', 'fsaverage')
  if (not os.path.exists(test_dir)):
   return ('FREESURFER_HOME (%s) does not contain the fsaverage subject.' % fs_home)

def _fs_home_problem ( fs_home ) : if ( fs_home is None ) : return 'FREESURFER_HOME is not set.' elif ( not os . path . exists ( fs_home ) ) : return ( 'FREESURFER_HOME (%s) does not exist.' % fs_home ) else : test_dir = os . path . join ( fs_home , 'subjects' , 'fsaverage' ) if ( not os . path . exists ( test_dir ) ) : return ( 'FREESURFER_HOME (%s) does not contain the fsaverage subject.' % fs_home )
check freesurfer_home path .