code: def test_protected():
      td = TabularData(["col1", "col2", "col3", "other"])
      td.append(["foo", "bar", "baz", "other_val"])
      td.protect("col1", "col2")
  
      td.drop("col1", "col2", "col3", "other")
      assert td.keys() == ["col1", "col2"]
      assert list(td) == [["foo", "bar"]]
  
      td.unprotect("col2")
  
      td.drop("col1", "col2")
      assert td.keys() == ["col1"]
      assert list(td) == [["foo"]]
  
file_path: dvc/tests/unit/test_tabular_data.py
imports: import pytest
  from dvc.compare import TabularData
label_desc: Use image node_id 6 for calling a global function with example usage: test_protected() without return types