class Context:
    """
    This class is responsible for storing the (key, val_tuple) pairs after mapping, combining, and reducing.
    In each phase and each worker, a different instance of Context will be used.
    """
    def __init__(self):
        self.key_val_pairs = []
        """
        key_val_pair tuple's signature
            key_val_pair = (key, [val,...])
        """

    def write(self, key: str, val: str):
        val_tuple = (val)
        key_val_pair = (key, val_tuple)
        self.key_val_pairs.append(key_val_pair)

    def get_key_val_pairs(self):
        return self.key_val_pairs

    def clear(self):
        self.key_val_pairs.clear()

f164c0b066a0d6db6e446cb00a82b5d5d2db34f5
class Context:
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

class Context:
    <mask token>
    <mask token>

    def write(self, key: str, val: str):
        val_tuple = val
        key_val_pair = key, val_tuple
        self.key_val_pairs.append(key_val_pair)
    <mask token>

    def clear(self):
        self.key_val_pairs.clear()

class Context:
    <mask token>

    def __init__(self):
        self.key_val_pairs = []
        """
        key_val_pair tuple's signature
            key_val_pair = (key, [val,...])
        """

    def write(self, key: str, val: str):
        val_tuple = val
        key_val_pair = key, val_tuple
        self.key_val_pairs.append(key_val_pair)

    def get_key_val_pairs(self):
        return self.key_val_pairs

    def clear(self):
        self.key_val_pairs.clear()

class Context:
    """
    This class is responsible for storing the (key, val_tuple) pairs after mapping, combining, and reducing.
    In each phase and each worker, a different instance of Context will be used.
    """

    def __init__(self):
        self.key_val_pairs = []
        """
        key_val_pair tuple's signature
            key_val_pair = (key, [val,...])
        """

    def write(self, key: str, val: str):
        val_tuple = val
        key_val_pair = key, val_tuple
        self.key_val_pairs.append(key_val_pair)

    def get_key_val_pairs(self):
        return self.key_val_pairs

    def clear(self):
        self.key_val_pairs.clear()

class Context:
    """
    This class is responsible for storing the (key, val_tuple) pairs after mapping, combining, and reducing.
    In each phase and each worker, a different instance of Context will be used.
    """
    def __init__(self):
        self.key_val_pairs = []
        """
        key_val_pair tuple's signature
            key_val_pair = (key, [val,...])
        """

    def write(self, key: str, val: str):
        val_tuple = (val)
        key_val_pair = (key, val_tuple)
        self.key_val_pairs.append(key_val_pair)

    def get_key_val_pairs(self):
        return self.key_val_pairs

    def clear(self):
        self.key_val_pairs.clear()
