<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def isimplementation(obj, interfaces):
 """ Returns `True` if `obj` is a class implementing all of `interfaces` or an instance of such class. `interfaces` can be a single :term:`interface` class or an iterable of interface classes. """

    if not inspect.isclass(obj):
        isimplementation(obj.__class__, interfaces)
    if not isinstance(interfaces, collections.Iterable):
        interfaces = [interfaces]
    return frozenset(interfaces).issubset(
        get_implemented_interfaces(obj)
    )