def METHOD_NAME(cls, handle: TextIO) -> "PlaylunkyConfig":
    config = configparser.ConfigParser(inline_comment_prefixes="#")
    config.read_file(handle)
    obj = cls()
    for section, options in SECTIONS.items():
        for option in options:
            option_type = OPTION_TYPES.get(option, bool)
            if option_type == int:
                val = config.getint(section, option, fallback=None)
            elif option_type == bool:
                val = config.getboolean(section, option, fallback=None)
                if val is None:
                    val = config.getboolean(
                        LEGACY_INI_SECTION, option, fallback=None
                    )
            if val is None:
                continue
            setattr(obj, option, val)
    obj.ini = config
    return obj