code: def main():
      checkpoint_storage = tempfile.mkdtemp()
      core_v2.init(
          defaults=core_v2.DefaultConfig(
              name="unmanaged-1-error",
          ),
          checkpoint_storage=checkpoint_storage,
      )
  
      for i in range(100):
          core_v2.train.report_training_metrics(
              steps_completed=i, metrics={"loss": random.random()}
          )
          if i == 15:
              raise ValueError("oops")
          if (i + 1) % 10 == 0:
              core_v2.train.report_validation_metrics(
                  steps_completed=i, metrics={"loss": random.random()}
              )
  
      core_v2.close()
  
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types