code: def get_input():
      """Gathers input from user."""
      msg = "Path to training dataset directory"
      if FLAGS.data_path:
          data_path = check_bucket(FLAGS.data_path, msg)
      else:
          data_path = prompt_gs_path(msg, required=True)
  
      msg = "Path for saving model, snapshots and summaries"
      if FLAGS.save_dir:
          save_dir = check_bucket(FLAGS.save_dir, msg)
      else:
          save_dir = prompt_gs_path(msg, required=True)
  
      msg = "Path for restoring checkpoints before training"
      if not FLAGS.restore_dir:
          restore_dir = prompt_gs_path(msg)
          if not restore_dir:
              restore_dir = save_dir
  
      msg = "Path to configuration file: "
      if FLAGS.config_path:
          config_path = check_local_file(FLAGS.config_path, msg)
      else:
          config_path = prompt_local_path(msg)
  
      if FLAGS.project_id:
          project_id = check_project_id(FLAGS.project_id)
      else:
          project_id = get_project_id()
  
      image_uri = "gcr.io/" + project_id + "/ddsp_training:train_job"
  
      time_diff = datetime.datetime.now() - datetime.datetime(
          1970, 1, 1
      )
      uid = int((time_diff).total_seconds())
      job_name = f"training_job_{uid}"
  
      if not FLAGS.region:
          region = get_region()
  
      msg = "Batch size"
      if FLAGS.batch_size:
          batch_size = FLAGS.batch_size
      else:
          batch_size = prompt_value(msg, "16")
  
      msg = "Learning rate"
      if FLAGS.learning_rate:
          learning_rate = FLAGS.learning_rate
      else:
          learning_rate = prompt_value(msg, "0.0001")
  
      msg = "Number of steps"
      if FLAGS.num_steps:
          num_steps = FLAGS.num_steps
      else:
          num_steps = prompt_value(msg, "40000")
  
      msg = "Steps per save"
      if FLAGS.steps_per_save:
          steps_per_save = FLAGS.steps_per_save
      else:
          steps_per_save = prompt_value(msg, "300")
  
      msg = "Steps per summary"
      if FLAGS.steps_per_summary:
          steps_per_summary = FLAGS.steps_per_summary
      else:
          steps_per_summary = prompt_value(msg, "300")
  
      msg = "Early stop loss value"
      if FLAGS.early_stop_loss_value:
          early_stop_loss_value = FLAGS.early_stop_loss_value
      else:
          early_stop_loss_value = prompt_value(msg, "5")
  
      args = {
          "data_path": data_path,
          "save_dir": save_dir,
          "restore_dir": restore_dir,
          "config_path": config_path,
          "image_uri": image_uri,
          "job_name": job_name,
          "region": region,
          "batch_size": batch_size,
          "learning_rate": learning_rate,
          "num_steps": num_steps,
          "steps_per_save": steps_per_save,
          "steps_per_summary": steps_per_summary,
          "early_stop_loss_value": early_stop_loss_value,
      }
      return args
  
imports: import datetime
  import os
  import subprocess
  from absl import app
  from absl import flags
  from google.cloud import storage
label_desc: Use image node_id 9 for calling a global function with example usage: get_input() and returns: args