parameters: (request_hooks, session_hooks, dict_class=OrderedDict)
return_statement: return merge_setting(request_hooks, session_hooks, dict_class)
docstring: Properly merges both requests and session hooks.
  
      This is necessary because when request_hooks == {'response': []}, the
      merge breaks Session hooks entirely.
docstring_summary: Properly merges both requests and session hooks.
docstring_tokens: Properly merges both requests and session hooks .
function: def merge_hooks(request_hooks, session_hooks, dict_class=OrderedDict):
      """Properly merges both requests and session hooks.
  
      This is necessary because when request_hooks == {'response': []}, the
      merge breaks Session hooks entirely.
      """
      if session_hooks is None or session_hooks.get('response') == []:
          return request_hooks
  
      if request_hooks is None or request_hooks.get('response') == []:
          return session_hooks
  
      return merge_setting(request_hooks, session_hooks, dict_class)
function_tokens: def merge_hooks ( request_hooks , session_hooks , dict_class = OrderedDict ) : if session_hooks is None or session_hooks . get ( 'response' ) == [ ] : return request_hooks if request_hooks is None or request_hooks . get ( 'response' ) == [ ] : return session_hooks return merge_setting ( request_hooks , session_hooks , dict_class )