class_docstr: Runs all components of Airflow under a single parent process.
  
  Useful for local development.
class_docstr_tok: ["Runs","all","components","of","Airflow","under","a","single","parent","process",".","Useful","for","local","development","."]
docstr: Works out the environment variables needed to run subprocesses.
  
  We override some settings as part of being standalone.
docstr_tok: ["Works","out","the","environment","variables","needed","to","run","subprocesses",".","We","override","some","settings","as","part","of","being","standalone","."]
code: def calculate_env(self):
      """
      Works out the environment variables needed to run subprocesses.
  
      We override some settings as part of being standalone.
      """
      env = dict(os.environ)
  
      # Make sure we're using a local executor flavour
      executor_class, _ = ExecutorLoader.import_default_executor_cls()
      if not executor_class.is_local:
          if "sqlite" in conf.get("database", "sql_alchemy_conn"):
              self.print_output(
                  "standalone", "Forcing executor to SequentialExecutor"
              )
              env[
                  "AIRFLOW__CORE__EXECUTOR"
              ] = executor_constants.SEQUENTIAL_EXECUTOR
          else:
              self.print_output(
                  "standalone", "Forcing executor to LocalExecutor"
              )
              env[
                  "AIRFLOW__CORE__EXECUTOR"
              ] = executor_constants.LOCAL_EXECUTOR
      return env
  
imports: from __future__ import annotations
  import logging
  import os
  import socket
  import subprocess
  import threading
  import time
  from collections import deque
  from typing import TYPE_CHECKING
  from termcolor import colored
  from airflow.configuration import conf
  from airflow.executors import executor_constants
  from airflow.executors.executor_loader import ExecutorLoader
  from airflow.jobs.job import most_recent_job
  from airflow.jobs.scheduler_job_runner import SchedulerJobRunner
  from airflow.jobs.triggerer_job_runner import TriggererJobRunner
  from airflow.utils import db
  from airflow.utils.providers_configuration_loader import providers_configuration_loaded
label_desc: Use image node_id 7 for calling the StandaloneCommand obj's underlying member method code with example usage: obj.calculate_env() and returns: env