def safe_key(key, key_prefix, version):
 key = cleaned_string(key)
 key_prefix = cleaned_string(key_prefix)
 version = cleaned_string(version)
 combined = ':'.join([key_prefix, version, key])
 if (len(combined) > 250):
  combined = fasthash(combined)
 return combined

def safe_key ( key , key_prefix , version ) : key = cleaned_string ( key ) key_prefix = cleaned_string ( key_prefix ) version = cleaned_string ( version ) combined = ':' . join ( [ key_prefix , version , key ] ) if ( len ( combined ) > 250 ) : combined = fasthash ( combined ) return combined
given a key .