def _invert_selem(selem):
 inverted = selem[((slice(None, None, (-1)),) * selem.ndim)]
 return inverted

def _invert_selem ( selem ) : inverted = selem [ ( ( slice ( None , None , ( - 1 ) ) , ) * selem . ndim ) ] return inverted
change the order of the values in selem .