code: def pad_to_power2(data, axis = None, mode="constant"):
      
      if axis is None:
          axis = list(range(data.ndim))
  
      if np.all([_is_power2(n) for i, n in enumerate(data.shape) if i in axis]):
          return data
      else:
          return pad_to_shape(data,[(_next_power_of_2(n) if i in axis else n) for i,n in enumerate(data.shape)], mode)
docs: pad data to a shape of power 2
      if axis == None all axis are padded