class_docstr: Base class for the abstract InputSource. 
class_docstr_tok: ["Base","class","for","the","abstract","InputSource","."]
docstr: Yield a context under a cached name scope, whose name is the name of
  this InputSource class.
docstr_tok: ["Yield","a","context","under","a","cached","name","scope",",","whose","name","is","the","name","of","this","InputSource","class","."]
code: def cached_name_scope(self):
      """
      Yield a context under a cached name scope, whose name is the name of
      this InputSource class.
      """
      if self._name_scope:
          with tf.name_scope(self._name_scope):
              yield self._name_scope
      else:
          name = type(self).__name__
          with tf.name_scope(name) as ns:
              self._name_scope = ns
              yield ns
  
imports: import copy
  from abc import ABCMeta, abstractmethod
  from contextlib import contextmanager
  import six
  import tensorflow
  from ..callbacks.base import CallbackFactory
  from ..tfutils.common import get_op_tensor_name
  from ..utils import logger
  from ..utils.argtools import call_only_once, memoized_method
  from ..compat import tfv1
label_desc: Use image node_id 12 for calling the InputSource obj's underlying member method code with example usage: obj.cached_name_scope() without return types