def load_backend(self, name,
                     dumps='dumps', loads='loads', loads_exc=ValueError):

        """Load a JSON backend by name.

        This method loads a backend and sets up references to that
        backend's loads/dumps functions and exception classes.

        :param dumps: is the name of the backend's encode method.
          The method should take an object and return a string.
          Defaults to 'dumps'.
        :param loads: names the backend's method for the reverse
          operation -- returning a Python object from a string.
        :param loads_exc: can be either the name of the exception class
          used to denote decoding errors, or it can be a direct reference
          to the appropriate exception class itself.  If it is a name,
          then the assumption is that an exception class of that name
          can be found in the backend module's namespace.
        :param load: names the backend's 'load' method.
        :param dump: names the backend's 'dump' method.
        :rtype bool: True on success, False if the backend could not be loaded.

        """
        try:
            # Load the JSON backend
            mod = __import__(name)
        except ImportError:
            return False

        # Handle submodules, e.g. django.utils.simplejson
        try:
            for attr in name.split('.')[1:]:
                mod = getattr(mod, attr)
        except __HOLE__:
            return False

        if (not self._store(self._encoders, name, mod, dumps) or
                not self._store(self._decoders, name, mod, loads)):
            return False

        if isinstance(loads_exc, (str, unicode)):
            # This backend's decoder exception is part of the backend
            if not self._store(self._decoder_exceptions, name, mod, loads_exc):
                return False
        else:
            # simplejson uses ValueError
            self._decoder_exceptions[name] = loads_exc

        # Setup the default args and kwargs for this encoder/decoder
        self._encoder_options[name] = ([], {})
        self._decoder_options[name] = ([], {})

        # Add this backend to the list of candidate backends
        self._backend_names.append(name)

        # Indicate that we successfully loaded a JSON backend
        self._verified = True
        return True
dataset/ETHPy150Open jsonpickle/jsonpickle/jsonpickle/backend.py/JSONBackend.load_backend