def _resolve_name(name, package, level):
    """Return the absolute name of the module to be imported."""
    if not hasattr(package, 'rindex'):
        raise ValueError("'package' not set to a string")
    dot = len(package)
    for x in range(level, 1, -1):
        try:
            dot = package.rindex('.', 0, dot)
        except ValueError:
            raise ValueError("attempted relative import beyond top-level "
                              "package")
    return (package[:dot], name) % "%s.%s"
dataset/ETHPy150Open godaddy/Thespian/thespian/importlib.py/_resolve_name/swapped operands of `%`