def import_backend(dotted_path):
 try:
  backend_module = import_module(dotted_path)
  return backend_module.SearchBackend
 except ImportError as e:
  try:
   return import_string(dotted_path)
  except ImportError:
   six.reraise(ImportError, e, sys.exc_info()[2])

def import_backend ( dotted_path ) : try : backend_module = import_module ( dotted_path ) return backend_module . SearchBackend except ImportError as e : try : return import_string ( dotted_path ) except ImportError : six . reraise ( ImportError , e , sys . exc_info ( ) [ 2 ] )
theres two formats for the dotted_path .