<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def scripthash_to_address(scripthash):
 """ Convert a script hash to a public address. Args: scripthash (bytes):
 Returns: str: base58 encoded string representing the wallet address. """

    sb = bytearray([ADDRESS_VERSION]) + scripthash
    c256 = bin_dbl_sha256(sb)[0:4]
    outb = sb + bytearray(c256)
    return base58.b58encode(bytes(outb)).decode("utf-8")