def METHOD_NAME(self, toas, acc_delay=None):
    """
    Returns total shapiro delay to due solar system objects.
    If the PLANET_SHAPIRO model param is set to True then
    planets are included, otherwise only the value for the
    Sun is calculated.
    Requires Astrometry or similar model that provides the
    ssb_to_psb_xyz method for direction to pulsar.
    If planets are to be included, TOAs.compute_posvels() must
    have been called with the planets=True argument.
    """
    # Start out with 0 delay with units of seconds
    tbl = toas.table
    delay = numpy.zeros(len(tbl))
    for key, grp in toas.get_obs_groups():
        if key.lower() == "barycenter":
            log.debug("Skipping Shapiro delay for Barycentric TOAs")
            continue
        psr_dir = self._parent.ssb_to_psb_xyz_ICRS(
            epoch=tbl[grp]["tdbld"].astype(numpy.float64)
        )
        delay[grp] += self.ss_obj_shapiro_delay(
            tbl[grp]["obs_sun_pos"], psr_dir, self._ss_mass_sec["sun"]
        )
        try:
            if self.PLANET_SHAPIRO.value:
                for pl in ("jupiter", "saturn", "venus", "uranus", "neptune"):
                    delay[grp] += self.ss_obj_shapiro_delay(
                        tbl[grp][f"obs_{pl}_pos"],
                        psr_dir,
                        self._ss_mass_sec[pl],
                    )
        except KeyError as e:
            raise KeyError(
                "Planet positions not found when trying to compute Solar System Shapiro delay. "
                "Make sure that you include `planets=True` in your `get_TOAs()` call, or use `get_model_and_toas()`."
            ) from e
    return delay * u.second