def _filepath(self, name):
if self.file_ext is None:<EOL><INDENT>candidates = glob.glob(os.path.join(self.directory, name + "<STR_LIT>"))<EOL>try:<EOL><INDENT>return next(filter(_is_morphology_file, candidates))<EOL><DEDENT>except StopIteration:<EOL><INDENT>raise NeuroMError("<STR_LIT>" % name)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return os.path.join(self.directory, name + self.file_ext)<EOL><DEDENT>
File path to `name` morphology file.