original_docstring: 
      Make directory based on timestamp, data_id and class_run_id.
  
      Arguments:
          ctx: click cli context
          base_dir: path to the base directory
          run_id: run_id of the current job
          conn: DIRBS PostgreSQL connection object
          config: DIRBS config object
          class_run_id: run if of the classification job
          extra_options: extra options dir
      Returns:
          report_dir: Report directory path
      
docstring: Make directory based on timestamp, data_id and class_run_id.
docstring_tokens: Make directory based on timestamp data_id and class_run_id .
code: def make_report_directory(ctx: callable, base_dir: str, run_id: int, conn: callable,
                            config: callable, class_run_id: int = None, **extra_options) -> str:
      """
      Make directory based on timestamp, data_id and class_run_id.
  
      Arguments:
          ctx: click cli context
          base_dir: path to the base directory
          run_id: run_id of the current job
          conn: DIRBS PostgreSQL connection object
          config: DIRBS config object
          class_run_id: run if of the classification job
          extra_options: extra options dir
      Returns:
          report_dir: Report directory path
      """
      assert run_id
      fn_components = ['report']
  
      # subcommand
      subcommand = ctx.command.name
      fn_components.append(subcommand)
  
      # timestamp
      run_id_start_time = metadata.job_start_time_by_run_id(conn, run_id)
      assert run_id_start_time
      fn_components.append(run_id_start_time.strftime('%Y%m%d_%H%M%S'))
  
      # run_id
      fn_components.append('run_id_{0:d}'.format(run_id))
  
      # class_run_id - to be computed if not provided and could be None in case of no classification jobs.
      if not class_run_id:
          cond_run_info = utils.most_recently_run_condition_info(conn, [c.label for c in config.conditions],
                                                                 successful_only=True)
          if not cond_run_info:
              class_run_id = None
          else:
              class_run_id = max([v['run_id'] for k, v in cond_run_info.items()])
  
      if class_run_id:
          fn_components.append('class_id_{0:d}'.format(class_run_id))
  
      # data_id, month, year
      for k, v in sorted(extra_options.items()):
          assert v
          fn_components.append('{0}_{1}'.format(k, v))
  
      dir_name = '__'.join(fn_components)
      report_dir = os.path.join(base_dir, dir_name)
      os.makedirs(report_dir)
      return report_dir
code_tokens: def make_report_directory ( ctx : callable , base_dir : str , run_id : int , conn : callable , config : callable , class_run_id : int = None , ** extra_options ) -> str : assert run_id fn_components = [ 'report' ] subcommand = ctx . command . name fn_components . append ( subcommand ) run_id_start_time = metadata . job_start_time_by_run_id ( conn , run_id ) assert run_id_start_time fn_components . append ( run_id_start_time . strftime ( '%Y%m%d_%H%M%S' ) ) fn_components . append ( 'run_id_{0:d}' . format ( run_id ) ) if not class_run_id : cond_run_info = utils . most_recently_run_condition_info ( conn , [ c . label for c in config . conditions ] , successful_only = True ) if not cond_run_info : class_run_id = None else : class_run_id = max ( [ v [ 'run_id' ] for k , v in cond_run_info . items ( ) ] ) if class_run_id : fn_components . append ( 'class_id_{0:d}' . format ( class_run_id ) ) for k , v in sorted ( extra_options . items ( ) ) : assert v fn_components . append ( '{0}_{1}' . format ( k , v ) ) dir_name = '__' . join ( fn_components ) report_dir = os . path . join ( base_dir , dir_name ) os . makedirs ( report_dir ) return report_dir
short_docstring: Make directory based on timestamp, data_id and class_run_id.
short_docstring_tokens: Make directory based on timestamp data_id and class_run_id .
comment: """
      Make directory based on timestamp, data_id and class_run_id.
  
      Arguments:
          ctx: click cli context
          base_dir: path to the base directory
          run_id: run_id of the current job
          conn: DIRBS PostgreSQL connection object
          config: DIRBS config object
          class_run_id: run if of the classification job
          extra_options: extra options dir
      Returns:
          report_dir: Report directory path
      """$SEP$# subcommand$SEP$# timestamp$SEP$# run_id$SEP$# class_run_id - to be computed if not provided and could be None in case of no classification jobs.$SEP$# data_id, month, year