code: def _current_component(view_func, dashboard=None, panel=None):
      
      @functools.wraps(view_func, assigned=available_attrs(view_func))
      def dec(request, *args, **kwargs):
          if dashboard:
              request.horizon['dashboard'] = dashboard
          if panel:
              request.horizon['panel'] = panel
          return view_func(request, *args, **kwargs)
      return dec
docs: Sets the currently-active dashboard and/or panel on the request.