code: def test_datum_getattr():
      x = datum["foo"]
      assert repr(x) == "datum['foo']"
  
      magic_attr = "__magic__"
      with pytest.raises(AttributeError):
          getattr(datum, magic_attr)
  
file_path: altair/tests/expr/test_expr.py
imports: import operator
  import pytest
  from altair import expr
  from altair import datum
  from altair import ExprRef
  from jsonschema.exceptions import ValidationError
label_desc: Use image node_id 9 for calling a global function with example usage: test_datum_getattr() without return types