docs: def draw_pathfinder_trajectory(
          self,
          trajectory,
          color="#ff0000",
          offset=None,
          scale=(1, 1),
          show_dt=False,
          dt_offset=0.0,
          **kwargs
      ):
          """
              Special helper function for drawing trajectories generated by
              robotpy-pathfinder
              
              :param trajectory: A list of pathfinder segment objects
              :param offset: If specified, should be x/y tuple to add to the path
                             relative to the robot coordinates
              :param scale: Multiply all points by this (x,y) tuple
              :param show_dt: draw text every N seconds along path, or False
              :param dt_offset: add this to each dt shown
              :param kwargs: Keyword options to pass to tkinter.create_line
          """
          # pathfinder x/y coordinates are switched
          pts = [(pt.x, -pt.y) for pt in trajectory]
          robot_coordinates = offset if offset else True
          self.draw_line(
              pts,
              color=color,
              robot_coordinates=robot_coordinates,
              relative_to_first=True,
              arrow=True,
              scale=scale,
          )
  
          if show_dt:
              dt = trajectory[0].dt
  
              def _defer_text():
                  # defer this execution to save effort when drawing
                  px_per_ft = UserRenderer._global_ui.field.px_per_ft
                  line = self._elements[-1]
  
                  for i in range(0, len(pts), int(show_dt / dt)):
                      text = "t=%.2f" % (dt_offset + i * dt,)
                      el = TextElement(
                          text, line.pts[i], 0, "#000000", int(px_per_ft * 0.5)
                      )
                      UserRenderer._global_ui.field.add_moving_element(el)
                      self._elements.append(el)
  
              self._run(_defer_text)