<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_channel(fcn):
 """Decorator that ensures a valid channel passed in. Args: fcn (function):
 Function that has a ChannelResource as its second argument. Returns: (function):
 Wraps given function with one that checks for a valid channel. """


    def wrapper(*args, **kwargs):
        if not isinstance(args[1], ChannelResource):
            raise RuntimeError('resource must be an instance of intern.resource.boss.ChannelResource.')

        if not args[1].cutout_ready:
            raise PartialChannelResourceError(
                    'ChannelResource not fully initialized.  Use intern.remote.BossRemote.get_channel({}, {}, {})'.format(
                        args[1].name, args[1].coll_name, args[1].exp_name))
        return fcn(*args, **kwargs)

    return wrapper