code: def import_freesurfer_LUT(fs_lut=None):
      
      if fs_lut is not None:
          lg.info('Reading user-specified lookuptable {}'.format(fs_lut))
          fs_lut = Path(fs_lut)
      else:
          try:
              fs_home = environ['FREESURFER_HOME']
          except KeyError:
              raise OSError('Freesurfer is not installed or FREESURFER_HOME is '
                            'not defined as environmental variable')
          else:
              fs_lut = Path(fs_home) / 'FreeSurferColorLUT.txt'
              lg.info('Reading lookuptable in FREESURFER_HOME {}'.format(fs_lut))
  
      idx = []
      label = []
      rgba = empty((0, 4))
      with fs_lut.open('r') as f:
          for l in f:
              if len(l) <= 1 or l[0] == '#' or l[0] == '\r':
                  continue
              (t0, t1, t2, t3, t4, t5) = [t(s) for t, s in
                                          zip((int, str, int, int, int, int),
                                          l.split())]
              idx.append(t0)
              label.append(t1)
              rgba = vstack((rgba, array([t2, t3, t4, t5])))
  
      return idx, label, rgba
docs: Import Look-up Table with colors and labels for anatomical regions.
  
      It's necessary that Freesurfer is installed and that the environmental
      variable 'FREESURFER_HOME' is present.
  
      Parameters
      ----------
      fs_lut : str or Path
          path to file called FreeSurferColorLUT.txt
  
      Returns
      -------
      idx : list of int
          indices of regions
      label : list of str
          names of the brain regions
      rgba : numpy.ndarray
          one row is a brain region and the columns are the RGB + alpha colors