code: def _expand_by_backend(cls, options, backend):
          
          groups = defaultdict(list)
          used_fallback = False
          for obj in options:
              if 'backend' in obj.kwargs:
                  opts_backend = obj.kwargs['backend']
              elif backend is None:
                  opts_backend = Store.current_backend
                  obj.kwargs['backend']= opts_backend
              else:
                  opts_backend = backend
                  obj.kwargs['backend'] = opts_backend
                  used_fallback = True
              groups[opts_backend].append(obj)
  
          if backend and not used_fallback:
              cls.param.warning("All supplied Options objects already define a backend, "
                                "backend override %r will be ignored." % backend)
  
          return [(bk, cls._expand_options(o, bk)) for (bk, o) in groups.items()]
docs: Given a list of flat Option objects which may or may not have
          'backend' in their kwargs, return a list of grouped backend