def METHOD_NAME(self):
    defined_channels = {'X', 'Y'}
    properties = {'defined_channels': defined_channels, 'duration': 5}
    apt = AbstractPulseTemplate(identifier='my_apt', **properties)
    serializer = mock.MagicMock()
    with self.assertRaisesRegex(RuntimeError, "not supported"):
        apt.get_serialization_data(serializer=serializer)
    expected = {**properties,
                '#identifier': 'my_apt',
                '#type': 'qupulse.pulses.abstract_pulse_template.AbstractPulseTemplate'}
    self.assertEqual(apt.get_serialization_data(), expected)
    dummy = DummyPulseTemplate(**properties)
    apt.link_to(dummy)
    self.assertEqual(apt.get_serialization_data(), expected)
    apt = AbstractPulseTemplate(identifier='my_apt', **properties)
    apt.link_to(dummy, serialize_linked=True)
    expected = dummy.get_serialization_data()
    self.assertEqual(apt.get_serialization_data(), expected)