code: def requires_contrib(test_method):
      try:
          _ = tf.contrib
      except AttributeError:
          test_method = unittest.skip(
              "This test requires tf.contrib:\n    `pip install tensorflow<=1.15`"
          )(test_method)
  
      return test_method
  
file_path: tensorflow-upstream/tensorflow/examples/speech_commands/train_test.py
imports: import os
  import unittest
  import tensorflow
  from tensorflow.examples.speech_commands import train
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling a global function with example usage: requires_contrib(test_method) and returns: test_method