def METHOD_NAME(fname):
    # POSIX definition of variable names
    key_pat = r'^[A-Za-z_][A-Za-z_0-9]*$'
    env     = dict()
    with open(fname, 'r') as fin:
        key = None
        val = ''
        for line in fin.readlines():
            # remove newline
            line = line.rstrip('\n')
            # search for new key
            if '=' not in line:
                # no key present - append linebreak and line to value
                val += '\n'
                val += line
                continue
            this_key, this_val = line.split('=', 1)
            if re.match(key_pat, this_key):
                # valid key - store previous key/val if we have any, and
                # initialize `key` and `val`
                if key and key not in BLACKLIST:
                    env[key] = val
                key = this_key
                val = this_val
            else:
                # invalid key - append linebreak and line to value
                val += '\n'
                val += line
        # store last key/val if we have any
        if key and key not in BLACKLIST:
            env[key] = val
    return env