class_docstr: Test the scene class.
class_docstr_tok: ["Test","the","scene","class","."]
docstr: Test __getitem__ with names only.
docstr_tok: ["Test","__getitem__","with","names","only","."]
code: def test_getitem(self):
      """Test __getitem__ with names only."""
      scene = Scene()
      scene["1"] = ds1 = xr.DataArray(np.arange(5))
      scene["2"] = ds2 = xr.DataArray(np.arange(5))
      scene["3"] = ds3 = xr.DataArray(np.arange(5))
      assert scene["1"] is ds1
      assert scene["2"] is ds2
      assert scene["3"] is ds3
      pytest.raises(KeyError, scene.__getitem__, "4")
      assert scene.get("3") is ds3
      assert scene.get("4") is None
  
imports: import math
  import numpy
  import pytest
  import xarray
  from dask import array
  from satpy import Scene
  from satpy.dataset.dataid import default_id_keys_config
  from satpy.tests.utils import FAKE_FILEHANDLER_END, FAKE_FILEHANDLER_START, make_cid, make_dataid
label_desc: Use image node_id 7 for calling the TestDataAccessMethods obj's underlying member method code with example usage: obj.test_getitem() without return types