code: def normalize_shape(shape):
      
  
      if shape is None:
          raise TypeError('shape is None')
  
      # handle 1D convenience form
      if isinstance(shape, numbers.Integral):
          shape = (int(shape),)
  
      # normalize
      shape = tuple(int(s) for s in shape)
      return shape
docs: Convenience function to normalize the `shape` argument.