code: def _determine_run_dir(self, _id):
      if _id is None:
          bucket_exists = self._bucket_exists()
          if not bucket_exists:
              self._create_bucket()
              bucket_path_subdirs = []
          else:
              bucket_path_subdirs = self._list_s3_subdirs()
  
          if not bucket_path_subdirs:
              max_run_id = 0
          else:
              integer_directories = [
                  int(d) for d in bucket_path_subdirs 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 = s3_join(self.basedir, str(_id))
      if self._objects_exist_in_dir(self.dir):
          raise FileExistsError(
              "S3 dir at {} already exists".format(self.dir)
          )
      return _id
  
imports: import json
  import os
  import os.path
  from sacred.commandline_options import cli_option
  from sacred.dependencies import get_digest
  from sacred.observers.base import RunObserver
  from sacred.serializer import flatten
  import re
  import socket
label_desc: Use image node_id 6 for calling the S3Observer obj's underlying member method code with example usage: obj._determine_run_dir(_id) and returns: _id