code: def test_dict_like_interfaces():
      td = TabularData(["col-1", "col-2"])
  
      td.extend([["foo", "bar"], ["foobar", "foobar"]])
      assert td.keys() == ["col-1", "col-2"]
      assert dict(td.items()) == {
          "col-1": ["foo", "foobar"],
          "col-2": ["bar", "foobar"],
      }
      assert td.as_dict() == [
          {"col-1": "foo", "col-2": "bar"},
          {"col-1": "foobar", "col-2": "foobar"},
      ]
      assert td.as_dict(["col-1"]) == [
          {"col-1": "foo"},
          {"col-1": "foobar"},
      ]
  
file_path: dvc/tests/unit/test_tabular_data.py
imports: import pytest
  from dvc.compare import TabularData
label_desc: Use image node_id 3 for calling a global function with example usage: test_dict_like_interfaces() without return types