def METHOD_NAME(self, path):
    if path.endswith('.gz'):
        with gzip.open(path, 'rt') as fin:
            self.rlines(fin)
    else:
        with open(path, 'rt') as fin:
            self.rlines(fin)