@nyio.importer('<STR_LIT>', ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'))<EOL>def load_freesurfer_geometry(filename, to='<STR_LIT>', warn=False):
if not warn:<EOL><INDENT>with warnings.catch_warnings():<EOL><INDENT>warnings.filterwarnings('<STR_LIT:ignore>',<EOL>category=UserWarning,<EOL>module='<STR_LIT>')<EOL>(xs, fs, info) = fsio.read_geometry(filename, read_metadata=True)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>(xs, fs, info) = fsio.read_geometry(filename, read_metadata=True)<EOL><DEDENT>filename = os.path.split(filename)[<NUM_LIT:1>]<EOL>filename = filename.lower()<EOL>if   filename.startswith('<STR_LIT>'): info['<STR_LIT>'] = '<STR_LIT>'<EOL>elif filename.startswith('<STR_LIT>'): info['<STR_LIT>'] = '<STR_LIT>'<EOL>to = to.lower()<EOL>if to in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>return geo.Mesh(fs, xs, meta_data=info)<EOL><DEDENT>elif to in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>return geo.Tesselation(fs, meta_data=info)<EOL><DEDENT>elif to in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>return xs<EOL><DEDENT>elif to in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>return fs<EOL><DEDENT>elif to in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>return info<EOL><DEDENT>elif to =='<STR_LIT>':<EOL><INDENT>return (xs, fs)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>' % to)<EOL><DEDENT>
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.