'shows the address in a given chain with a given address\'s hash.'

def q_translate_address(abe, page, chain):

    addr = wsgiref.util.shift_path_info(page['env'])
    if ((chain is None) or (addr is None)):
        return 'Translates    ADDRESS    for    use    in    CHAIN.\n/chain/CHAIN/q/translate_address/ADDRESS\n'
    (version, hash) = util.decode_check_address(addr)
    if (hash is None):
        return (addr + '    (INVALID    ADDRESS)')
    return util.hash_to_address(chain.address_version, hash)
