As discussed in  https://github.com/apache/airflow/pull/15534#discussion_r620500075, we could possibly rewrite Beam Hook to remove the need of storing state in it.
#
#
#
"""This module contains a Apache Beam Hook."""
from __future__ import annotations
import contextlib
import copy
import json
import os
import select
import shlex
import shutil
import subprocess
import textwrap
from tempfile import TemporaryDirectory
from typing import Callable
from packaging.version import Version
from airflow.exceptions import AirflowConfigException, AirflowException
from airflow.hooks.base import BaseHook
from airflow.providers.google.go_module_utils import init_module, install_dependencies
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.python_virtualenv import prepare_virtualenv
class BeamRunnerType: