def code_name(code, number=0):
 hash_digest = hashlib.md5(code.encode('utf-8')).hexdigest()
 return '<ipython-input-{0}-{1}>'.format(number, hash_digest[:12])

def code_name ( code , number = 0 ) : hash_digest = hashlib . md5 ( code . encode ( 'utf-8' ) ) . hexdigest ( ) return '<ipython-input-{0}-{1}>' . format ( number , hash_digest [ : 12 ] )
compute a unique name for code for caching .