def _has_context(value):
    """A *value* is a *(data, context)* pair, if it is a tuple of length 2,
    where the second element is derived from a *dictionary*.
    """
    if isinstance(value, tuple):
        if len(value) == 2:
            if isinstance(value[1], dict):
                return True
    return False