code: def _correct_for_light_travel_time(observer, target):
      
      t = observer.t
      ts = t.ts
      cposition = observer.position.au
      cvelocity = observer.velocity.au_per_d
      tposition, tvelocity, gcrs_position, message = target._at(t)
      distance = length_of(tposition - cposition)
      light_time0 = 0.0
      t_tdb = t.tdb
      for i in range(10):
          light_time = distance / C_AUDAY
          delta = light_time - light_time0
          if -1e-12 < min(delta) and max(delta) < 1e-12:
              break
          t2 = ts.tdb(jd=t_tdb - light_time)
          tposition, tvelocity, gcrs_position, message = target._at(t2)
          distance = length_of(tposition - cposition)
          light_time0 = light_time
      else:
          raise ValueError('light-travel time failed to converge')
      return tposition - cposition, tvelocity - cvelocity, t, light_time
docs: Return a light-time corrected astrometric position and velocity.
  
      Given an `observer` that is a `Barycentric` position somewhere in
      the solar system, compute where in the sky they will see the body
      `target`, by computing the light-time between them and figuring out
      where `target` was back when the light was leaving it that is now
      reaching the eyes or instruments of the `observer`.