def _create_shape(flat_names):
 try:
  (_, shape_str) = flat_names[(-1)].rsplit('__', 1)
 except ValueError:
  return ()
 return tuple(((int(i) + 1) for i in shape_str.split('_')))

def _create_shape ( flat_names ) : try : ( _ , shape_str ) = flat_names [ ( - 1 ) ] . rsplit ( '__' , 1 ) except ValueError : return ( ) return tuple ( ( ( int ( i ) + 1 ) for i in shape_str . split ( '_' ) ) )
determine shape from create_flat_names output .