code: def parse_and_validate_working_dir(working_dir: str) -> str:
      """Parses and validates a 'working_dir' option.
  
      This should be a URI.
      """
      assert working_dir is not None
  
      if not isinstance(working_dir, str):
          raise TypeError(
              "`working_dir` must be a string, got "
              f"{type(working_dir)}."
          )
  
      validate_uri(working_dir)
  
      return working_dir
  
file_path: ray/python/ray/_private/runtime_env/validation.py
imports: import logging
  from pathlib import Path
  import sys
  from typing import Dict, List, Optional, Union
  from collections import OrderedDict
  import yaml
label_desc: Use image node_id 3 for calling a global function with example usage: parse_and_validate_working_dir(working_dir) and returns: working_dir