<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_class(location: str) -> type: """ Loads a class from a string and returns it. <class 'arca.backend.base.BaseBackend'> :raise ArcaMisconfigured: If the class can't be loaded. """

    module_name, _, class_name = location.rpartition(".")

    if not module_name:
        raise ArcaMisconfigured(f"The module is not specified, can't load class from '{location}'")

    try:
        imported_module = importlib.import_module(module_name)
        return getattr(imported_module, class_name)
    except ModuleNotFoundError:
        raise ArcaMisconfigured(f"{module_name} does not exist.")
    except AttributeError:
        raise ArcaMisconfigured(f"{module_name} does not have a {class_name} class")