code: def set_flags(self, **flags: Mapping[str, str]):
      available = self._jbackend.availableFlags()
      invalid = []
      for flag, value in flags.items():
          if flag in available:
              self._jbackend.setFlag(flag, value)
          else:
              invalid.append(flag)
      if len(invalid) != 0:
          raise FatalError(
              "Flags {} not valid. Valid flags: \n    {}".format(
                  ", ".join(invalid), "\n    ".join(available)
              )
          )
  
imports: from typing import Mapping, Set, Tuple
  import abc
  import socket
  import socketserver
  import sys
  from threading import Thread
  import orjson
  import requests
  import py4j
  from py4j.java_gateway import JavaObject, JVMView
  import hail
  from hail.expr import construct_expr
  from hail.ir import JavaIR
  from hail.utils.java import FatalError, Env, scala_package_object
  from .backend import ActionTag, Backend, fatal_error_from_java_error_triplet
  from ..hail_logging import Logger
  import http.client
label_desc: Use image node_id 9 for calling the Py4JBackend obj's underlying member method code with example usage: obj.set_flags() without return types