'Returns the correct action plugin to handle the requestion task action'

def _get_action_handler(self, connection, templar):

    module_prefix = self._task.action.split('_')[0]
    if (self._task.action in self._shared_loader_obj.action_loader):
        handler_name = self._task.action
    elif all(((module_prefix in C.NETWORK_GROUP_MODULES), (module_prefix in self._shared_loader_obj.action_loader))):
        handler_name = module_prefix
    else:
        handler_name = 'normal'
    handler = self._shared_loader_obj.action_loader.get(handler_name, task=self._task, connection=connection, play_context=self._play_context, loader=self._loader, templar=templar, shared_loader_obj=self._shared_loader_obj)
    if (not handler):
        raise AnsibleError(("the    handler    '%s'    was    not    found" % handler_name))
    return handler
