code: def _determine_run_dir(self, _id):
      if _id is None:
          basepath = os.path.join(self.basedir, "")
          bucket_path_subdirs = self._list_gcs_subdirs(prefix=basepath)
  
          if not bucket_path_subdirs:
              max_run_id = 0
          else:
              relative_paths = [
                  path.replace(self.basedir, "").strip("/")
                  for path in bucket_path_subdirs
              ]
              integer_directories = [
                  int(d) for d in relative_paths if d.isdigit()
              ]
              if not integer_directories:
                  max_run_id = 0
              else:
                  # If there are directories under basedir that aren't
                  # numeric run directories, ignore those
                  max_run_id = max(integer_directories)
  
          _id = max_run_id + 1
  
      self.dir = gcs_join(self.basedir, str(_id))
      if self._objects_exist_in_dir(self.dir):
          raise FileExistsError(
              "GCS dir at {} already exists".format(self.dir)
          )
      return _id
  
imports: import json
  import os
  import os.path
  import re
  from typing import Optional
  from sacred.commandline_options import cli_option
  from sacred.dependencies import get_digest
  from sacred.observers.base import RunObserver
  from sacred.serializer import flatten
  from sacred.utils import PathType
label_desc: Use image node_id 4 for calling the GoogleCloudStorageObserver obj's underlying member method code with example usage: obj._determine_run_dir(_id) and returns: _id