<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle(self, files, encoding, chunksize=1):
 """ Handle given files with given encoding. :param files: opened files. :type files: list :param encoding: encoding of opened file :type encoding: string :param chunksize: a number of chunk :type chunksize: int :rtype: list """

        stats = []
        if files:
            logging.info("Input file count: %d", len(files))
            for fp in files:
                stream = self.reader(fp, encoding)
                parsed = self.streamer.consume(stream,
                    source=fp.name, chunksize=chunksize)
                stats.append(parsed)
                if not fp.closed:
                    fp.close()
        else:
            stream = sys.stdin
            if self.delimiter:
                stream = csvreader(stream, encoding, delimiter=self.delimiter)
            parsed = self.streamer.consume(stream, chunksize=chunksize)
            stats.append(parsed)
        return stats