code: def vgsr_to_vhel(coordinate, vgsr, vsun=None):
      
  
      if vsun is None:
          vsun = coord.Galactocentric.galcen_v_sun.to_cartesian().xyz
  
      return vgsr - _get_vproj(coordinate, vsun)
docs: Convert a radial velocity in the Galactic standard of rest (GSR) to
      a barycentric radial velocity.
  
      Parameters
      ----------
      coordinate : :class:`~astropy.coordinates.SkyCoord`
          An Astropy SkyCoord object or anything object that can be passed
          to the SkyCoord initializer.
      vgsr : :class:`~astropy.units.Quantity`
          GSR line-of-sight velocity.
      vsun : :class:`~astropy.units.Quantity`
          Full-space velocity of the sun in a Galactocentric frame. By default,
          uses the value assumed by Astropy in
          `~astropy.coordinates.Galactocentric`.
  
      Returns
      -------
      vhel : :class:`~astropy.units.Quantity`
          Radial velocity in a barycentric rest frame.