def read_chunk(self, remote_file, chunk_size=CHUNK_SIZE):
        """This function reads the next chunk of data from the provided remote file using
        the specified chunk size. If a `SessionError` is encountered,
        it retries up to 3 times by reconnecting the SMB connection. If the maximum number
        of retries is exhausted or an unexpected exception occurs, it returns an empty chunk.
        """

        chunk = ""
        retry = 3

        while retry > 0:
            retry -= 1
            try:
                chunk = remote_file.read(chunk_size)
                break

            except SessionError:
                if self.reconnect():
                    # Little hack to reset the smb connection instance
                    remote_file.__smbConnection = self.smb.conn
                    return self.read_chunk(remote_file)

            except Exception:
                traceback.print_exc()
                break

        return chunk
This function reads the next chunk of data from the provided remote file using
        the specified chunk size. If a `SessionError` is encountered,
        it retries up to 3 times by reconnecting the SMB connection. If the maximum number
        of retries is exhausted or an unexpected exception occurs, it returns an empty chunk.
        
cme/modules/spider_plus.py