code: def get_gcs_requester_pays_configuration(
      *,
      gcs_requester_pays_configuration: Optional[
          GCSRequesterPaysConfiguration
      ] = None,
  ) -> Optional[GCSRequesterPaysConfiguration]:
      if gcs_requester_pays_configuration:
          return gcs_requester_pays_configuration
  
      project = configuration_of(
          ConfigVariable.GCS_REQUESTER_PAYS_PROJECT, None, None
      )
      buckets = configuration_of(
          ConfigVariable.GCS_REQUESTER_PAYS_BUCKETS, None, None
      )
  
      spark_conf = get_spark_conf_gcs_requester_pays_configuration()
  
      if spark_conf and (project or buckets):
          warnings.warn(
              f"You have specified the GCS requester pays configuration in both your "
              f"spark-defaults.conf ({spark_conf.conf_path}) and either an explicit argument or "
              f"through `hailctl config`. For GCS requester pays configuration, Hail "
              "first checks explicit arguments, then `hailctl config`, then "
              "spark-defaults.conf."
          )
  
      if project is not None:
          if buckets is not None:
              return (project, buckets.split(","))
          return project
  
      if spark_conf is None:
          return None
      warnings.warn(
          "Reading spark-defaults.conf to determine GCS requester pays "
          "configuration. This is deprecated. Please use `hailctl config "
          "set gcs_requester_pays/project` and `hailctl config set "
          "gcs_requester_pays/buckets`."
      )
  
      # https://github.com/GoogleCloudDataproc/hadoop-connectors/blob/master/gcs/CONFIGURATION.md#cloud-storage-requester-pays-feature-configuration
      if spark_conf.mode is None:
          if spark_conf.project or spark_conf.buckets:
              warnings.warn(
                  f"When reading GCS requester pays configuration from spark-defaults.conf "
                  f"({spark_conf.conf_path}), no mode is set, so requester pays "
                  f"will be disabled."
              )
          return None
  
      if spark_conf.mode == SparkConfGcsRequesterPaysMode.DISABLED:
          return None
  
      if spark_conf.project is None:
          raise ValueError(
              f"When reading GCS requester pays configuration from spark-defaults.conf "
              f"({spark_conf.conf_path}), a project must be set if a mode other than "
              f"DISABLED is set."
          )
  
      if spark_conf.mode == SparkConfGcsRequesterPaysMode.CUSTOM:
          if spark_conf.buckets is None:
              raise ValueError(
                  f"When reading GCS requester pays configuration from "
                  f"spark-defaults.conf ({spark_conf.conf_path}) with mode CUSTOM, "
                  f"buckets must be set."
              )
          return (spark_conf.project, spark_conf.buckets)
  
      if spark_conf.mode == SparkConfGcsRequesterPaysMode.ENABLED:
          warnings.warn(
              f"When reading GCS requester pays configuration from "
              f"spark-defaults.conf ({spark_conf.conf_path}) Hail treats the mode "
              f"ENABLED as AUTO."
          )
  
      if spark_conf.buckets is not None:
          warnings.warn(
              f"When reading GCS requester pays configuration from "
              f"spark-defaults.conf ({spark_conf.conf_path}) with mode "
              f"{spark_conf.mode}, found buckets: {spark_conf.buckets}."
              f"The buckets are ignored in this mode."
          )
  
      return spark_conf.project
  
file_path: hail/hail/python/hailtop/aiocloud/aiogoogle/user_config.py
imports: from typing import Optional, List, Union, Tuple
  import os
  import warnings
  from jproperties import Properties
  from enum import Enum
  from dataclasses import dataclass
  from hailtop.config.user_config import configuration_of
  from hailtop.config.variables import ConfigVariable
label_desc: Use image node_id 1 for calling a global function with example usage: get_gcs_requester_pays_configuration() and returns: spark_conf, gcs_requester_pays_configuration, project, None, None, None, spark_conf,  spark_conf, project,  buckets