<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _isinstance(obj, cls, bound_Generic=None, bound_typevars=None, bound_typevars_readonly=False, follow_fwd_refs=True, _recursion_check=None):
 """Access this via ``pytypes.is_of_type``. Works like ``isinstance``, but supports PEP 484 style types from ``typing`` module. obj : Any The object to check for being an instance of ``cls``. cls : type The type to check for ``obj`` being an instance of. bound_Generic : Optional[Generic] A type object holding values for unbound typevars occurring in ``cls``. Default: None If ``cls`` contains unbound ``TypeVar``s and ``bound_Generic`` is provided, this function attempts to retrieve corresponding values for the unbound ``TypeVar``s from ``bound_Generic``. In collision case with ``bound_typevars`` the value from ``bound_Generic`` if preferred. bound_typevars : Optional[Dict[typing.TypeVar, type]] A dictionary holding values for unbound typevars occurring in ``cls``. Default: {} Depending on ``bound_typevars_readonly`` pytypes can also bind values to typevars as needed. This is done by inserting according mappings into this dictionary. This can e.g. be useful to infer values for ``TypeVar``s or to consistently check a set of ``TypeVar``s across multiple calls, e.g. when checking all arguments of a function call. In collision case with ``bound_Generic`` the value from ``bound_Generic`` if preferred. bound_typevars_readonly : bool Defines if pytypes is allowed to write into the ``bound_typevars`` dictionary. Default: True If set to False, pytypes cannot assign values to ``TypeVar``s, but only checks regarding values already present in ``bound_typevars`` or ``bound_Generic``. follow_fwd_refs : bool Defines if ``ForwardRef``s should be explored. Default: True If this is set to ``False`` and a ``ForwardRef`` is encountered, pytypes aborts the check raising a ForwardRefError. _recursion_check : Optional[Dict[type, Set[type]]] Internally used for recursion checks. Default: None If ``Union``s and ``ForwardRef``s occur in the same type, recursions can occur. As soon as a ``ForwardRef`` is encountered, pytypes automatically creates this dictionary and continues in recursion-proof manner. """

    if bound_typevars is None:
        bound_typevars = {}
    # Special treatment if cls is Iterable[...]
    if is_Generic(cls) and cls.__origin__ is typing.Iterable:
        if not is_iterable(obj):
            return False
        itp = get_iterable_itemtype(obj)
        if itp is None:
            return not pytypes.check_iterables
        else:
            return _issubclass(itp, cls.__args__[0], bound_Generic, bound_typevars,
                    bound_typevars_readonly, follow_fwd_refs, _recursion_check)
    if is_Callable(cls):
        return _isinstance_Callable(obj, cls, bound_Generic, bound_typevars,
                bound_typevars_readonly, follow_fwd_refs, _recursion_check)
    return _issubclass(deep_type(obj), cls, bound_Generic, bound_typevars,
            bound_typevars_readonly, follow_fwd_refs, _recursion_check)