@classmethod
def write_mode(cls, format):
    """
        Return the correct write mode for this type of format.
        """
    if format == cls.PICKLE:
        return 'wb'
    else:
        return 'w'
