def decode_from_sha(sha):
    """convert coerced sha back into numeric list"""
    if isinstance(sha, str):
        sha = sha.encode('utf-8')
    return codecs.decode(re.sub(rb'(00)*$', b'', sha), "hex_codec")
def decode_from_sha ( sha ) : if isinstance ( sha , str ) : sha = sha . encode ( 'utf-8' ) return codecs . decode ( re . sub ( rb'(00)*$' , b'' , sha ) , "hex_codec" )
convert coerced sha back into numeric list