def get_safe_part(key):
 version = key[0]
 assert version
 c_link_key = key[1]
 for key_element in c_link_key[1:]:
  if (isinstance(key_element, string_types) and key_element.startswith('md5:')):
   md5 = key_element[4:]
   break
 return (key[0] + (md5,))

def get_safe_part ( key ) : version = key [ 0 ] assert version c_link_key = key [ 1 ] for key_element in c_link_key [ 1 : ] : if ( isinstance ( key_element , string_types ) and key_element . startswith ( 'md5:' ) ) : md5 = key_element [ 4 : ] break return ( key [ 0 ] + ( md5 , ) )
return a tuple containing a subset of key .