def METHOD_NAME(self, input):
    if hasattr(input, "name"):
        self.filename = input.name
    elif not getattr(self, "filename", ""):
        self.filename = ""
    if hasattr(input, "read"):
        tmsrc = input.read()
        input.close()
        input = tmsrc
    self._soup = TradosSoup(input)
    for tu in self._soup.findAll("tru"):
        unit = TradosUnit()
        unit._soup = TradosSoup(str(tu))
        self.addunit(unit)