class_docstr: Test the Scene object's `.load` method for composites.
class_docstr_tok: ["Test","the","Scene","object","'s","`",".load","`","method","for","composites","."]
docstr: Test load complex composite followed by other datasets.
code: def test_load_dataset_after_composite2(self):
      """Test load complex composite followed by other datasets."""
      from satpy.readers.yaml_reader import FileYAMLReader
      from satpy.tests.utils import FakeCompositor, FakeModifier
  
      load_mock = spy_decorator(FileYAMLReader.load)
      comp_mock = spy_decorator(FakeCompositor.__call__)
      mod_mock = spy_decorator(FakeModifier.__call__)
      with mock.patch.object(
          FileYAMLReader, "load", load_mock
      ), mock.patch.object(
          FakeCompositor, "__call__", comp_mock
      ), mock.patch.object(
          FakeModifier, "__call__", mod_mock
      ):
          lmock = load_mock.mock
          scene = Scene(filenames=["fake1_1.txt"], reader="fake1")
          scene.load(["comp10"])
          assert lmock.call_count == 1
          loaded_ids = list(scene._datasets.keys())
          assert len(loaded_ids) == 1
          with mock.patch.object(
              scene,
              "_generate_composites_nodes_from_loaded_datasets",
              wraps=scene._generate_composites_nodes_from_loaded_datasets,
          ) as m:
              scene.load(["ds1"])
              assert lmock.call_count == 2
              loaded_ids = list(scene._datasets.keys())
              assert len(loaded_ids) == 2
              # this is the unmodified ds1
              assert (
                  make_dataid(
                      name="ds1",
                      resolution=250,
                      calibration="reflectance",
                      modifiers=tuple(),
                  )
                  in loaded_ids
              )
              # m.assert_called_once_with(set([scene._dependency_tree['ds1']]))
              m.assert_called_once_with(set())
          with mock.patch.object(
              scene,
              "_generate_composites_nodes_from_loaded_datasets",
              wraps=scene._generate_composites_nodes_from_loaded_datasets,
          ) as m:
              scene.load(["ds1"])
              assert lmock.call_count == 2
              loaded_ids = list(scene._datasets.keys())
              assert len(loaded_ids) == 2
              # this is the unmodified ds1
              assert (
                  make_dataid(
                      name="ds1",
                      resolution=250,
                      calibration="reflectance",
                      modifiers=tuple(),
                  )
                  in loaded_ids
              )
              m.assert_called_once_with(set())
          # we should only generate the comp10 composite once but comp2 was also generated
          assert comp_mock.mock.call_count == 1 + 1
          # Create the modded ds1 at comp10, then load the umodified version
          # again
          assert mod_mock.mock.call_count == 1
          loaded_ids = list(scene._datasets.keys())
          assert len(loaded_ids) == 2
  
imports: from unittest import mock
  import pytest
  import xarray
  from dask import array
  from satpy import Scene
  from satpy.tests.utils import make_cid, make_dataid, make_dsq, spy_decorator
label_desc: Use image node_id 16 for calling the TestLoadingComposites obj's underlying member method code with example usage: obj.test_load_dataset_after_composite2() without return types