class_docstr: Hook for Google Dataflow.
  
  All the methods in the hook where project_id is used must be called with
  keyword arguments rather than positional.
class_docstr_tok: ["Hook","for","Google","Dataflow",".","All","the","methods","in","the","hook","where","project_id","is","used","must","be","called","with","keyword","arguments","rather","than","positional","."]
code: def _update_environment(
      self, variables: dict, environment: dict | None = None
  ) -> dict:
      environment = environment or {}
      # available keys for runtime environment are listed here:
      # https://cloud.google.com/dataflow/docs/reference/rest/v1b3/RuntimeEnvironment
      environment_keys = {
          "numWorkers",
          "maxWorkers",
          "zone",
          "serviceAccountEmail",
          "tempLocation",
          "bypassTempDirValidation",
          "machineType",
          "additionalExperiments",
          "network",
          "subnetwork",
          "additionalUserLabels",
          "kmsKeyName",
          "ipConfiguration",
          "workerRegion",
          "workerZone",
      }
  
      def _check_one(key, val):
          if key in environment:
              self.log.warning(
                  "%r parameter in 'variables' will override the same one passed in 'environment'!",
                  key,
              )
          return key, val
  
      environment.update(
          _check_one(key, val)
          for key, val in variables.items()
          if key in environment_keys
      )
  
      return environment
  
imports: from __future__ import annotations
  import functools
  import json
  import re
  import shlex
  import subprocess
  import time
  import uuid
  import warnings
  from copy import deepcopy
  from typing import TYPE_CHECKING, Any, Callable, Generator, Sequence, TypeVar, cast
  from google.cloud.dataflow_v1beta3 import GetJobRequest, Job, JobState, JobsV1Beta3AsyncClient, JobView
  from google.cloud.dataflow_v1beta3.types.jobs import ListJobsRequest
  from googleapiclient.discovery import build
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
  from airflow.providers.apache.beam.hooks.beam import BeamHook, BeamRunnerType, beam_options_to_args
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook
  from airflow.utils.log.logging_mixin import LoggingMixin
  from airflow.utils.timeout import timeout
label_desc: Use image node_id 5 for calling the DataflowHook obj's underlying member method code with example usage: obj._update_environment(variables, environment) and returns: environment, key,  val