code: def test_error_raising(raw, epochs):
      """Tests input checking."""
      with pytest.raises(
          TypeError, match=r"must be an instance of list"
      ):
          unify_bad_channels("bad input")
      with pytest.raises(ValueError, match=r"insts must not be empty"):
          unify_bad_channels([])
      with pytest.raises(
          TypeError,
          match=r"each object in insts must be an instance of",
      ):
          unify_bad_channels(["bad_instance"])
      with pytest.raises(ValueError, match=r"same type"):
          unify_bad_channels([raw, epochs])
      with pytest.raises(
          ValueError, match=r"Channels do not match across"
      ):
          raw_alt1 = raw.copy()
          raw_alt1.drop_channels(raw.info["ch_names"][-1])
          unify_bad_channels(
              [raw, raw_alt1]
          )  # ch diff preserving order
      with pytest.raises(ValueError, match=r"sorted differently"):
          raw_alt2 = raw.copy()
          new_order = [raw.ch_names[-1]] + raw.ch_names[:-1]
          raw_alt2.reorder_channels(new_order)
          unify_bad_channels([raw, raw_alt2])
  
imports: import pytest
  from mne.channels import unify_bad_channels
label_desc: Use image node_id 1 for calling a global function with example usage: test_error_raising(raw, epochs) without return types