<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def uridecode(uristring, encoding='utf-8', errors='strict'):
 """Decode a URI string or string component."""

    if not isinstance(uristring, bytes):
        uristring = uristring.encode(encoding or 'ascii', errors)
    parts = uristring.split(b'%')
    result = [parts[0]]
    append = result.append
    decode = _decoded.get
    for s in parts[1:]:
        append(decode(s[:2], b'%' + s[:2]))
        append(s[2:])
    if encoding is not None:
        return b''.join(result).decode(encoding, errors)
    else:
        return b''.join(result)