<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_command_hook(command, task_active=True):
 """ Gets registered command ``Plugin`` instance for the provided command. `command` Command string registered to a plugin. `task_active` Set to ``False`` to indicate no active tasks. Returns ``Plugin`` instance or ``None``. """


    plugin_obj = _command_hooks.get(command)

    if plugin_obj:
        if task_active or (not plugin_obj.options and
                           not plugin_obj.task_only):

            if not _is_plugin_disabled(plugin_obj):
                return plugin_obj

    return None