def METHOD_NAME(self, sample_input, expected_output):
    output = _check_and_process_bytes(sample_input, preserve_whitespace=True)
    self.assertIsInstance(output, str)
    self.assertEqual(output, expected_output)