def set_version(self, version):
    self.version = version.lower()
    if (self.version not in list(self.version_types.keys())):
        err = f'Error: Unsupported model version ({self.version}). Valid model versions are:'
        for v in list(self.version_types.keys()):
            err += f' {v}'
        raise Exception(err)
    self.heading = f'# Name file for {self.version_types[self.version]}, generated by Flopy version {__version__}.'
    for p in self.get_package_list():
        pak = self.get_package(p)
        if hasattr(pak, 'heading'):
            pak._generate_heading()
    return None
def set_version(self, version):
    self.version = version.lower()
    if (self.version not in list(self.version_types.keys())):
        err = f'Error: Unsupported model version ({self.version}). Valid model versions are:'
        for v in list(self.version_types.keys()):
            err += f' {v}'
        raise Exception(err)
    self.heading = f'# Name file for {self.version_types[self.version]}, generated by Flopy version {__version__}.'
    for p in self.get_package_list():
        pak = self.get_package(p)
        if hasattr(pak, 'heading'):
            pak._generate_heading()
    return None