code: def _check_config_file(self, usr):
          ''' Make sure a config file exists in the config dir '''
          package_config_file = path.join(path.dirname(__file__), 'config')
          user_config_file = path.join(usr, 'config')
  
          ''' restore config from bck file '''
          if path.exists(user_config_file + '.restore'):
              try:
                  copyfile(user_config_file + '.restore', user_config_file)
                  remove(self.user_config_file + '.restore')
              except:
                  pass
  
          ''' Copy package config into user dir '''
          if not path.exists(user_config_file):
              copyfile(package_config_file, user_config_filef _check_config_file(self, usr):
          ''' Make sure a config file exists in the config dir '''
          package_config_file = path.join(path.dirname(__file__), 'config')
          user_config_file = path.join(usr, 'config')
  
          ''' restore config from bck file '''
          if path.exists(user_config_file + '.restore'):
              try:
                  copyfile(user_config_file + '.restore', user_config_file)
                  remove(self.user_config_file + '.restore')
              except:
                  pass
  
          ''' Copy package config into user dir '''
          if not path.exists(user_config_file):
              copyfile(package_config_file, user_config_file)
docs: Make sure a config file exists in the config dir