def METHOD_NAME(
    self,
    test_case: str,
    function: str,
):
    """Tests serialization and deserialization consistency and correctness.
    Args:
        name (str): '{test_group_name}-{test_case_name}'. Useful for print statements/debugging.
        test_case (str): Test case name (without file extension).
        test_data_dir (str): The directory containing the test case files.
        function (str, optional): The function name to compile.
        read (bool): Whether the pipeline/component supports deserialization from YAML (IR, except for V1 component YAML back compatability tests).
        write (bool): Whether the pipeline/component supports compilation from a Python file.
    """
    yaml_file = os.path.join(_TEST_DATA_DIR, f'{test_case}.yaml')
    py_file = os.path.join(_TEST_DATA_DIR, f'{test_case}.py')
    self._test_serialization_correctness(
        python_file=py_file, yaml_file=yaml_file, function_name=function)
    self._test_serialization_deserialization_consistency(
        yaml_file=yaml_file)