docs: def load_freesurfer_geometry(filename, to='mesh', warn=False):
      '''
      load_freesurfer_geometry(filename) yields the data stored at the freesurfer geometry file given
        by filename. The optional argument 'to' may be used to change the kind of data that is
        returned.
  
      The following are valid settings for the 'to' keyword argument:
        * 'mesh' (the default) yields a mesh object
        * 'tess' yields a tess object (discarding coordinates)
        * 'raw' yields a tuple of numpy arrays, identical to the read_geometry return value.
      '''
      if not warn:
          with warnings.catch_warnings():
              warnings.filterwarnings('ignore',
                                      category=UserWarning,
                                      module='nibabel')
              (xs, fs, info) = fsio.read_geometry(filename, read_metadata=True)
      else:
          (xs, fs, info) = fsio.read_geometry(filename, read_metadata=True)
      # see if there's chirality data here...
      filename = os.path.split(filename)[1]
      filename = filename.lower()
      if   filename.startswith('lh'): info['chirality'] = 'lh.'
      elif filename.startswith('rh'): info['chirality'] = 'rh.'
      # parse it into something
      to = to.lower()
      if to in ['mesh', 'auto', 'automatic']:
          return geo.Mesh(fs, xs, meta_data=info)
      elif to in ['tess', 'tesselation']:
          return geo.Tesselation(fs, meta_data=info)
      elif to in ['coords', 'coordinates']:
          return xs
      elif to in ['triangles', 'faces']:
          return fs
      elif to in ['meta', 'meta_data']:
          return info
      elif to =='raw':
          return (xs, fs)
      else:
          raise ValueError('Could not understand \'to\' argument: %s' % to)