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