code: def cartesian_to_spherical(x, y, z):
      
      rho = cartesian_to_spherical_rho(x, y, z)
      phi = cartesian_to_spherical_azimuthal(x, y)
      theta = cartesian_to_spherical_polar(x, y, z)
      return rho, phi, theta
docs: Maps cartesian coordinates (x,y,z) to spherical coordinates
      (rho,phi,theta) where phi is in [0,2*pi] and theta is in [0,pi].
  
      Parameters
      ----------
      x : {numpy.array, float}
          X-coordinate.
      y : {numpy.array, float}
          Y-coordinate.
      z : {numpy.array, float}
          Z-coordinate.
  
      Returns
      -------
      rho : {numpy.array, float}
          The radial amplitude.
      phi : {numpy.array, float}
          The azimuthal angle.
      theta : {numpy.array, float}
          The polar angle.