code: def register_backends(vars):
      
      new_backends = {x.replace('Backend', ''): cls
                      for x, cls in vars.items()
                      if inspect.isclass(cls) and issubclass(cls, Backend)}
      available_backends.update(new_backends)
docs: Register backends for use with models.
  
      `vars` should be a dictionary of variables obtained from e.g. `locals()`,
      at least some of which are Backend classes, e.g. from imports.