def toPyObject(variant):
    """
    Return `variant` as a python object if it is wrapped in a `QVariant`
    instance (using `variant.toPyObject()`). In case the sip API version
    for QVariant does not export it just return the object unchanged.

    """
    return variant
