code: def get_collection(collection_name, scope=None, names=None):
      scope = parse_scopes(scope)[0]
      collection = tf.get_collection(collection_name, scope=scope + "/")
      if names is None:
          return collection
      else:
          if not isinstance(names, list):
              names = [names]
          _collection = []
          for x in collection:
              if any([name in x.name for name in names]):
                  _collection.append(x)
          return _collection
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  import warnings
  from contextlib import contextmanager
  from .version_utils import tf_later_than
label_desc: Use image node_id 7 for calling a global function with example usage: get_collection(collection_name, scope, names) and returns: collection, _collection