code: def test_5839():
      """Test concatenating raw objects with annotations."""
      # Global Time 0         1         2         3         4
      #             .
      #      raw_A  |---------XXXXXXXXXX
      #      annot  |--------------AA
      #    latency  .         0    0    1    1    2    2    3
      #             .              5    0    5    0    5    0
      #
      #      raw_B  .                   |---------YYYYYYYYYY
      #      annot  .                   |--------------AA
      #    latency  .                             0         1
      #             .                                  5    0
      #             .
      #     output  |---------XXXXXXXXXXYYYYYYYYYY
      #      annot  |--------------AA---|----AA
      #    latency  .         0    0    1    1    2    2    3
      #             .              5    0    5    0    5    0
      #
      EXPECTED_ONSET = [1.5, 2.0, 2.0, 2.5]
      EXPECTED_DURATION = [0.2, 0.0, 0.0, 0.2]
      EXPECTED_DESCRIPTION = [
          "dummy",
          "BAD boundary",
          "EDGE boundary",
          "dummy",
      ]
  
      def raw_factory(meas_date):
          raw = RawArray(
              data=np.empty((10, 10)),
              info=create_info(ch_names=10, sfreq=10.0),
              first_samp=10,
          )
          raw.set_meas_date(meas_date)
          raw.set_annotations(
              annotations=Annotations(
                  onset=[0.5],
                  duration=[0.2],
                  description="dummy",
                  orig_time=None,
              )
          )
          return raw
  
      raw_A, raw_B = (raw_factory((x, 0)) for x in [0, 2])
      raw_A.append(raw_B)
  
      assert_array_equal(raw_A.annotations.onset, EXPECTED_ONSET)
      assert_array_equal(raw_A.annotations.duration, EXPECTED_DURATION)
      assert_array_equal(
          raw_A.annotations.description, EXPECTED_DESCRIPTION
      )
      assert raw_A.annotations.orig_time == _stamp_to_dt((0, 0))
  
imports: import math
  import os
  import re
  from contextlib import redirect_stdout
  from io import StringIO
  from os import path
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_array_less
  import mne
  from mne import Annotations, concatenate_raws, create_info, pick_types
  from mne._fiff._digitization import DigPoint, _dig_kind_dict
  from mne._fiff.constants import FIFF
  from mne._fiff.meas_info import Info, _get_valid_units, _writing_info_hdf5
  from mne._fiff.pick import _ELECTRODE_CH_TYPES, _FNIRS_CH_TYPES_SPLIT
  from mne._fiff.proj import Projection
  from mne._fiff.utils import _mult_cal_one
  from mne.fixes import _numpy_h5py_dep
  from mne.io import BaseRaw, RawArray, read_raw_fif
  from mne.io.base import _get_scaling
  from mne.transforms import Transform
  from mne.utils import _import_h5io_funcs, _raw_annot, _stamp_to_dt, _TempDir, catch_logging, check_version, object_diff
label_desc: Use image node_id 12 for calling a global function with example usage: test_5839() and returns: raw