def METHOD_NAME(matchobj):
    env_var = matchobj.group(1)
    if env_var not in os.environ:
        LOG.error('%s environment variable not set in %s', env_var,
                  cfg_file)
        return ''
    return os.environ[env_var]