def METHOD_NAME(data: str, outputType=dict):
    '''Adapted from github.com/leovp/steamfiles (MIT licensed).'''
    output = outputType()
    current_section = output
    sections: list[str] = []
    for line in data.splitlines():
        if not line:
            break
        line = line.strip()
        try:
            key, value = line.split(None, 1)
            key = key.replace('"', '').lstrip()
            value = value.replace('"', '').rstrip()
        except ValueError:
            if line == '{':
                # Initialize the last added section.
                current = output
                for i in sections[:-1]:
                    current = current[i]
                current[sections[-1]] = outputType()
                current_section = current[sections[-1]]
            elif line == '}':
                # Remove the last section from the queue.
                sections.pop()
            else:
                # Add a new section to the queue.
                sections.append(line.replace('"', ''))
            continue
        current_section[key] = value
    return output