code: def unormg(v1, ndim):
      
      v1 = stypes.toDoubleVector(v1)
      vout = stypes.emptyDoubleVector(ndim)
      vmag = ctypes.c_double()
      ndim = ctypes.c_int(ndim)
      libspice.unormg_c(v1, ndim, vout, ctypes.byref(vmag))
      return stypes.cVectorToPython(vout), vmag.value
docs: Normalize a double precision vector of arbitrary dimension and
      return its magnitude.
  
      http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/unormg_c.html
  
      :param v1: Vector to be normalized. 
      :type v1: Array of floats
      :param ndim: This is the dimension of v1 and vout. 
      :type ndim: int
      :return: Unit vector of v1, Magnitude of v1.
      :rtype: tuple