code: def within_range(df, items=None):
      
      for k, (lower, upper) in items.items():
          if (lower > df[k]).any() or (upper < df[k]).any():
              bad = (lower > df[k]) | (upper < df[k])
              raise AssertionError("Outside range", bad)
      return df
docs: Assert that a DataFrame is within a range.
  
      Parameters
      ==========
      df : DataFame
      items : dict
        mapping of columns (k) to a (low, high) tuple (v)
        that ``df[k]`` is expected to be between.
  
      Returns
      =======
      df : DataFrame