docs: def check_shapes(
      feed: "Feed", *, as_df: bool = False, include_warnings: bool = False
  ) -> List:
      """
      Analog of :func:`check_agency` for ``feed.shapes``.
      """
      table = "shapes"
      problems = []
  
      # Preliminary checks
      if feed.shapes is None:
          return problems
  
      f = feed.shapes.copy()
      problems = check_for_required_columns(problems, table, f)
      if problems:
          return format_problems(problems, as_df=as_df)
  
      if include_warnings:
          problems = check_for_invalid_columns(problems, table, f)
  
      # Check shape_id
      problems = check_column(problems, table, f, "shape_id", valid_str)
  
      # Check shape_pt_lon and shape_pt_lat
      for column, bound in [("shape_pt_lon", 180), ("shape_pt_lat", 90)]:
          v = lambda x: pd.notnull(x) and -bound <= x <= bound
          cond = ~f[column].map(v)
          problems = check_table(
              problems,
              table,
              f,
              cond,
              f"{column} out of bounds {[-bound, bound]}",
          )
  
      # Check for duplicated (shape_id, shape_pt_sequence) pairs
      cond = f[["shape_id", "shape_pt_sequence"]].duplicated()
      problems = check_table(
          problems, table, f, cond, "Repeated pair (shape_id, shape_pt_sequence)"
      )
  
      # Check if shape_dist_traveled does decreases on a trip
      if "shape_dist_traveled" in f.columns:
          g = f.dropna(subset=["shape_dist_traveled"])
          indices = []
          prev_sid = None
          prev_dist = -1
          cols = ["shape_id", "shape_dist_traveled"]
          for i, sid, dist in g[cols].itertuples():
              if sid == prev_sid and dist < prev_dist:
                  indices.append(i)
  
              prev_sid = sid
              prev_dist = dist
  
          if indices:
              problems.append(
                  [
                      "error",
                      "shape_dist_traveled decreases on a trip",
                      table,
                      indices,
                  ]
              )
  
      return format_problems(problems, as_df=as_df)