<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _unpickle_channel(raw):
 """Try and unpickle a channel with sensible error handling """

    try:
        return pickle.loads(raw)
    except (ValueError, pickle.UnpicklingError, EOFError, TypeError,
            IndexError) as exc:
        # maybe not pickled
        if isinstance(raw, bytes):
            raw = raw.decode('utf-8')
        try:  # test if this is a valid channel name
            Channel.MATCH.match(raw)
        except ValueError:
            raise exc
        return raw