code: def test_io_annotation_txt(
      dummy_annotation_txt_file, tmp_path_factory, ch_names
  ):
      """Test TXT input/output without meas_date."""
      annot = read_annotations(str(dummy_annotation_txt_file))
      assert annot.orig_time is None
      kwargs = dict()
      if ch_names:
          kwargs["ch_names"] = [(), ("MEG0111", "MEG2563")]
      _assert_annotations_equal(
          annot,
          Annotations([3.14, 6.28], [42.0, 48], ["AA", "BB"], **kwargs),
      )
  
      # Now test writing
      fname = tmp_path_factory.mktemp("data") / "annotations.txt"
      annot.save(fname)
      annot2 = read_annotations(fname)
      _assert_annotations_equal(annot, annot2)
  
      # Now with an orig_time
      assert annot.orig_time is None
      annot._orig_time = _handle_meas_date(1038942071.7201)
      assert annot.orig_time is not None
      annot.save(fname, overwrite=True)
      annot2 = read_annotations(fname)
      assert annot2.orig_time is not None
      _assert_annotations_equal(annot, annot2)
  
imports: import sys
  from collections import OrderedDict
  from datetime import datetime, timedelta, timezone
  from itertools import repeat
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from pytest import approx
  import mne
  from mne import Annotations, Epochs, annotations_from_events, count_annotations, create_info, events_from_annotations, read_annotations
  from mne.annotations import _handle_meas_date, _read_annotations_txt_parse_header, _sync_onset
  from mne.datasets import testing
  from mne.io import RawArray, concatenate_raws, read_raw_fif
  from mne.utils import _dt_to_stamp, _raw_annot, _record_warnings, _stamp_to_dt, assert_and_remove_boundary_annot, catch_logging, check_version
label_desc: Use image node_id 27 for calling a global function with example usage: test_io_annotation_txt(dummy_annotation_txt_file, tmp_path_factory, ch_names) without return types