code: def test_load_chaining(self):
      calls = 0
  
      def increment():
          nonlocal calls
          calls += 1
          return str(calls)
  
      with gr.Blocks() as demo:
          out = gr.Textbox(label="Call counter")
          demo.load(increment, inputs=None, outputs=out).then(
              increment, inputs=None, outputs=out
          )
  
      assert demo.config["dependencies"][0]["targets"][0][1] == "load"
      assert demo.config["dependencies"][0]["trigger_after"] is None
      assert demo.config["dependencies"][1]["targets"][0][1] == "then"
      assert demo.config["dependencies"][1]["trigger_after"] == 0
  
file_path: gradio/test/test_events.py
imports: import ast
  import inspect
  from pathlib import Path
  import pytest
  from fastapi.testclient import TestClient
  import gradio
label_desc: Use image node_id 5 for calling the TestEvent obj's underlying member method code with example usage: obj.test_load_chaining() and returns: str