docs: def convert_dist(feed: "Feed", new_dist_units: str) -> "Feed":
      """
      Convert the distances recorded in the ``shape_dist_traveled``
      columns of the given Feed to the given distance units.
      New distance units must lie in :const:`.constants.DIST_UNITS`.
      Return the resulting feed.
      """
      feed = feed.copy()
  
      if feed.dist_units == new_dist_units:
          # Nothing to do
          return feed
  
      old_dist_units = feed.dist_units
      feed.dist_units = new_dist_units
  
      converter = hp.get_convert_dist(old_dist_units, new_dist_units)
  
      if hp.is_not_null(feed.stop_times, "shape_dist_traveled"):
          feed.stop_times["shape_dist_traveled"] = feed.stop_times[
              "shape_dist_traveled"
          ].map(converter)
  
      if hp.is_not_null(feed.shapes, "shape_dist_traveled"):
          feed.shapes["shape_dist_traveled"] = feed.shapes[
              "shape_dist_traveled"
          ].map(converter)
  
      return feed