code: def timing(name=""):
      """Log start, end, and duration."""
      start = datetime.datetime.now()
      timestamp = start.strftime("%H:%M")
      tf.logging.info("Starting job [%s] at %s", name, timestamp)
      yield
      end = datetime.datetime.now()
      timestamp = end.strftime("%H:%M")
      tf.logging.info("Finished job [%s] at %s", name, timestamp)
      duration = end - start
      duration_mins = duration.total_seconds() / 60
      tf.logging.info(
          "Total time [%s] (m): %d", name, int(duration_mins)
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  import datetime
  import gzip
  import os
  import re
  import urllib
  import tensorflow.compat.v1
label_desc: Use image node_id 10 for calling a global function with example usage: timing(name) without return types