code: def test_ldcp001_loading_component_initialization(dash_dcc):
      lock = Lock()
  
      app = Dash(__name__)
  
      app.layout = html.Div(
          [dcc.Loading([html.Div(id="div-1")], className="loading")],
          id="root",
      )
  
      @app.callback(
          Output("div-1", "children"), [Input("root", "n_clicks")]
      )
      def updateDiv(children):
          with lock:
              return "content"
  
      with lock:
          dash_dcc.start_server(app)
          dash_dcc.find_element(".loading .dash-spinner")
          # ensure inner component is also mounted
          dash_dcc.wait_for_text_to_equal("#div-1", "")
  
      dash_dcc.wait_for_text_to_equal("#div-1", "content")
  
      assert dash_dcc.get_logs() == []
  
file_path: dash/components/dash-core-components/tests/integration/loading/test_loading_component.py
imports: from multiprocessing import Lock
  from dash import Dash, Input, Output, dcc, html
  from dash.testing import wait
label_desc: Use image node_id 1 for calling a global function with example usage: test_ldcp001_loading_component_initialization(dash_dcc) and returns: str