code: def get_common_root(absolute_paths: List[str]) -> Optional[str]:
      try:
          common_root = os.path.commonpath(absolute_paths)
          if os.path.isfile(common_root):
              common_root = os.path.dirname(common_root)
          if common_root.startswith(os.getcwd() + os.sep):
              common_root = os.getcwd()
          return common_root
      except ValueError:
          return None
  
imports: import base64
  import logging
  import os
  from glob import glob
  from io import IOBase
  from typing import Iterable, List, Mapping, Optional, Set, TypeVar, Union
  from neptune.internal.types.stringify_value import StringifyValue
label_desc: Use image node_id 19 for calling a global function with example usage: get_common_root(absolute_paths) and returns: common_root, None