def check_isinstance(obj, cls):
    """Checks that obj is of type cls, and lets PyLint infer types."""
    if isinstance(obj, cls):
        return obj
    raise Exception((str(cls)) % _('Expected object of type: %s'))
    # TODO(justinsb): Can we make this better??
    return cls()  # Ugly PyLint hack
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/utils.py/check_isinstance/swapped operands of `%`