class PromptGenerator(object):
    def __init__(self):
        """
        Setup generation parameters for Gemma.

        UPDATE AS NEEDED.
        """
        self.output_len = 10
        self.temperature = 0.0
        self.top_p = 1.0

    def create_prompt(self, sample):
        """
        Input sample is a dictionary consisting of following fields
        'table': A dict containing table data and meta-data same as in Assignment 2
        'question': A python string for the question on the table.
        
        The function must return the prompt as a python string.

        UPDATE AS NEEDED.
        """
        # Example prompt
        prompt = """Read the following table and answer the related question.\n\n"""
        prompt += 'TABLE:\n'
        prompt += ','.join(
            [f'"{cc}"' for cc in sample['table']['cols']]
        ) + '\n'
        for row in sample['table']['rows']:
            prompt += ','.join(
                [f'"{rr}"' for rr in row]
            ) + '\n'
        prompt += '\n'
        prompt += 'QUESTION: ' + sample['question'] + '\n'

        return prompt
    
    def post_process(self, gen_text):
        """
        Input gen_text is a python string generated by Gemma for the prompt.
        
        The function must return a single python tuple (int, string)
        indicating the row and the column of the answer cell.

        UPDATE AS NEEDED.
        """
        return (0, 'dummy')
    