def METHOD_NAME(self, input):
    """Parse the given file or file source string."""
    if hasattr(input, "name"):
        self.filename = input.name
    elif not getattr(self, "filename", ""):
        self.filename = ""
    if hasattr(input, "read"):
        inisrc = input.read()
        input.close()
        input = inisrc
    if isinstance(input, bytes):
        input = StringIO(input.decode("utf-8"))
        self._inifile = INIConfig(input, optionxformvalue=None)
    else:
        self._inifile = INIConfig(open(input), optionxformvalue=None)
    for section in self._inifile:
        for entry in self._inifile[section]:
            source = self._dialect.unescape(self._inifile[section][entry])
            newunit = self.addsourceunit(source)
            newunit.addlocation(f"[{section}]{entry}")