code: def get_shape(img):
      
      if hasattr(img, 'shape'):
          shape = img.shape
      else:
          shape = img.get_data().shape
      return shape
docs: Return the shape of img.
  
      Paramerers
      -----------
      img:
  
      Returns
      -------
      shape: tuple