def infer_name(self):
if hasattr(self, "<STR_LIT:name>"):<EOL><INDENT>return self.name<EOL><DEDENT>config_folder = os.path.dirname(self.config_file)<EOL>project_name = os.path.basename(config_folder)<EOL>if project_name == METADATA_KEY:<EOL><INDENT>project_name = os.path.basename(os.path.dirname(config_folder))<EOL><DEDENT>return project_name<EOL>
Infer project name from config file path.

First assume the name is the folder in which the config file resides,
unless that folder is named "metadata", in which case the project name
is the parent of that folder.

:return str: inferred name for project.