<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _send_periodic_internal(self, msg, period, duration=None):
 """Default implementation of periodic message sending using threading. Override this method to enable a more efficient backend specific approach. :param can.Message msg: Message to transmit :param float period: Period in seconds between each message :param float duration: The duration to keep sending this message at given rate. If no duration is provided, the task will continue indefinitely. :return: A started task instance. Note the task can be stopped (and depending on the backend modified) by calling the :meth:`stop` method. :rtype: can.broadcastmanager.CyclicSendTaskABC """

        if not hasattr(self, "_lock_send_periodic"):
            # Create a send lock for this bus
            self._lock_send_periodic = threading.Lock()
        task = ThreadBasedCyclicSendTask(self, self._lock_send_periodic, msg, period, duration)
        return task