<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def handle_internal(msg):
 """Process an internal message."""

    internal = msg.gateway.const.Internal(msg.sub_type)
    handler = internal.get_handler(msg.gateway.handlers)
    if handler is None:
        return None
    return handler(msg)