code: def enable_with_args(dec):
      """A decorator for decorators to enable their usage with or without args."""
  
      @_safe_wraps(dec)
      def new_dec(*args, **kwargs):
          if len(args) == 1 and not kwargs and callable(args[0]):
              # Used as decorator without args
              fn = args[0]
              return dec(fn)
          else:
              return lambda fn: dec(fn, *args, **kwargs)
  
      return new_dec
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import re
  import numpy
  import six
  from six.moves import xrange
  from ..None import contrib_framework
  from tensorflow.python.eager import backprop
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.layers import base
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import control_flow_util
  from tensorflow.python.ops import custom_gradient
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import variable_scope
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 8 for calling a global function with example usage: enable_with_args(dec) and returns: new_dec, dec, function