def load_specific_backend(import_str, class_str):

    __import__(import_str)

    friendly_name = import_str.split('.')[-1].lower()

    obj = getattr(sys.modules[import_str], class_str)()

    backend_objects[friendly_name] = obj

    for primitive, primdata in obj.primitives.items():
        mangled_name = '%s.%s' % (friendly_name, primitive)
        synthetic_id = hash(mangled_name) & 0xFFFFFFFF

        if synthetic_id in backend_primitives:
            raise ValueError('duplicate primitive ID (%s).  %s vs %s' %
                             (synthetic_id, mangled_name,
                              backend_primitives[synthetic_id]['name']))

        backend_primitives[synthetic_id] = {}
        backend_primitives[synthetic_id]['name'] = mangled_name
        backend_primitives[synthetic_id]['id'] = synthetic_id

        for key in primdata:
            backend_primitives[synthetic_id][key] = \
                primdata[key]

        if not 'weight' in backend_primitives[synthetic_id]:
            backend_primitives[synthetic_id]['weight'] = 50

        if not 'timeout' in backend_primitives[synthetic_id]:
            backend_primitives[synthetic_id]['timeout'] = 30
load a backend given an import path and a classname.
dataset/ETHPy150Open rcbops/opencenter/opencenter/backends/__init__.py/load_specific_backend