code: def test_get_from_bootstrap_data_with_queries(self):
      username = "admin"
      self.login(username)
  
      # create a tab
      data = {
          "queryEditor": json.dumps(
              {
                  "title": "Untitled Query 1",
                  "dbId": 1,
                  "schema": None,
                  "autorun": False,
                  "sql": "SELECT ...",
                  "queryLimit": 1000,
              }
          )
      }
      resp = self.get_json_resp("/tabstateview/", data=data)
      tab_state_id = resp["id"]
  
      # run a query in the created tab
      self.run_sql(
          "SELECT name FROM birth_names",
          "client_id_1",
          username=username,
          raise_on_error=True,
          sql_editor_id=str(tab_state_id),
      )
      # run an orphan query (no tab)
      self.run_sql(
          "SELECT name FROM birth_names",
          "client_id_2",
          username=username,
          raise_on_error=True,
      )
  
      # we should have only 1 query returned, since the second one is not
      # associated with any tabs
      resp = self.get_json_resp("/api/v1/sqllab/")
      result = resp["result"]
      self.assertEqual(len(result["queries"]), 1)
  
imports: import datetime
  import json
  import random
  import csv
  import pandas
  import io
  import pytest
  import prison
  from sqlalchemy.sql import func
  from unittest import mock
  from flask_appbuilder.security.sqla.models import Role
  from tests.integration_tests.test_app import app
  from superset import db, sql_lab
  from superset.common.db_query_status import QueryStatus
  from superset.models.core import Database
  from superset.utils.database import get_example_database, get_main_database
  from superset.utils import core
  from superset.models.sql_lab import Query
  from tests.integration_tests.base_tests import SupersetTestCase
  from tests.integration_tests.fixtures.users import create_gamma_sqllab_no_data
label_desc: Use image node_id 3 for calling the TestSqlLabApi obj's underlying member method code with example usage: obj.test_get_from_bootstrap_data_with_queries() without return types