code: def test_dataframe_clip(self):
      # GH#2747
      df = DataFrame(
          np.random.default_rng(2).standard_normal((1000, 2))
      )
  
      for lb, ub in [(-1, 1), (1, -1)]:
          clipped_df = df.clip(lb, ub)
  
          lb, ub = min(lb, ub), max(ub, lb)
          lb_mask = df.values <= lb
          ub_mask = df.values >= ub
          mask = ~lb_mask & ~ub_mask
          assert (clipped_df.values[lb_mask] == lb).all()
          assert (clipped_df.values[ub_mask] == ub).all()
          assert (clipped_df.values[mask] == df.values[mask]).all()
  
file_path: pandas/pandas/tests/frame/methods/test_clip.py
imports: import numpy
  import pytest
  from pandas import DataFrame, Series
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestDataFrameClip obj's underlying member method code with example usage: obj.test_dataframe_clip() without return types