code: def shepp_logan_ellipsoids(ndim, modified=False):
      
      if ndim == 2:
          ellipsoids = _shepp_logan_ellipse_2d()
      elif ndim == 3:
          ellipsoids = _shepp_logan_ellipsoids_3d()
      else:
          raise ValueError('dimension not 2 or 3, no phantom available')
  
      if modified:
          _modified_shepp_logan_ellipsoids(ellipsoids)
  
      return ellipsoids
docs: Ellipsoids for the standard Shepp-Logan phantom in 2 or 3 dimensions.
  
      Parameters
      ----------
      ndim : {2, 3}
          Dimension of the space the ellipsoids should be in.
      modified : bool, optional
          True if the modified Shepp-Logan phantom should be given.
          The modified phantom has greatly amplified contrast to aid
          visualization.
  
      See Also
      --------
      odl.phantom.geometric.ellipsoid_phantom :
          Function for creating arbitrary ellipsoids phantoms
      shepp_logan : Create a phantom with these ellipsoids
  
      References
      ----------
      .. _Shepp-Logan phantom: https://en.wikipedia.org/wiki/Shepp-Logan_phantom