code: def test_take_first():
      df = pd.DataFrame({"a": ["x", "x", "y", "y"], "b": [0, 1, 2, 3]})
  
      res = df.take_first(subset="a", by="b")
      exp = df.iloc[[0, 2], :]
  
      assert_frame_equal(res, exp)
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_take_first() without return types