code: def _scala_map_str_to_tuple_str_str_to_dict(
      scala,
  ) -> Dict[str, Tuple[Optional[str], Optional[str]]]:
      it = scala.iterator()
      s: Dict[str, Tuple[Optional[str], Optional[str]]] = {}
      while it.hasNext():
          kv = it.next()
          k = kv._1()
          assert isinstance(k, str)
          v = kv._2()
          l = v._1()
          r = v._2()
          assert l is None or isinstance(l, str)
          assert r is None or isinstance(r, str)
          assert k not in s
          s[k] = (l, r)
      return s
  
file_path: hail/hail/python/test/hail/test_context.py
imports: from typing import Tuple, Dict, Optional
  import hail
  from hail.utils.java import Env
  from hail.backend.backend import Backend
  from hail.backend.spark_backend import SparkBackend
  from test.hail.helpers import skip_unless_spark_backend, hl_init_for_test, hl_stop_for_test, qobtest, with_flags
label_desc: Use image node_id 1 for calling a global function with example usage: _scala_map_str_to_tuple_str_str_to_dict(scala) and returns: s