class_docstr: Test case class implementing extra test functionalities.
class_docstr_tok: ["Test","case","class","implementing","extra","test","functionalities","."]
docstr: Creates a list of placeholders based on a list of shapes.
  
  Args:
    shapes: A tuple or list of the input shapes.
    dtypes: A list of input types.
    sparse_tensors: A `bool` list denoting if placeholder is a SparseTensor.
      This is ignored in eager mode - in eager execution, only dense
      placeholders will be created.
  
  Returns:
    A list of placeholders.
docstr_tok: ["Creates","a","list","of","placeholders","based","on","a","list","of","shapes",".","Args",":","shapes",":","A","tuple","or","list","of","the","input","shapes",".","dtypes",":","A","list","of","input","types",".","sparse_tensors",":","A","`","bool","`","list","denoting","if","placeholder","is","a","SparseTensor",".","This","is","ignored","in","eager","mode","-","in","eager","execution",",","only","dense","placeholders","will","be","created",".","Returns",":","A","list","of","placeholders","."]
code: def _create_placeholders_from_shapes(
      self, shapes, dtypes=None, sparse_tensors=None
  ):
      """Creates a list of placeholders based on a list of shapes.
  
      Args:
        shapes: A tuple or list of the input shapes.
        dtypes: A list of input types.
        sparse_tensors: A `bool` list denoting if placeholder is a SparseTensor.
          This is ignored in eager mode - in eager execution, only dense
          placeholders will be created.
  
      Returns:
        A list of placeholders.
      """
      if dtypes is None:
          dtypes = [tf.float32] * len(shapes)
      if sparse_tensors is None:
          sparse_tensors = [False] * len(shapes)
      if tf.executing_eagerly():
          placeholders = [
              tf.compat.v1.placeholder_with_default(
                  tf.zeros(shape=shape, dtype=dtype), shape=shape
              )
              for shape, dtype in zip(shapes, dtypes)
          ]
      else:
          placeholders = [
              tf.compat.v1.sparse.placeholder(dtype, shape=shape)
              if is_sparse
              else tf.compat.v1.placeholder(shape=shape, dtype=dtype)
              for shape, dtype, is_sparse in zip(
                  shapes, dtypes, sparse_tensors
              )
          ]
      return placeholders
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import warnings
  from absl import flags
  from absl.testing import parameterized
  import numpy
  from six.moves import zip
  import tensorflow
  from tensorflow_graphics.util import tfg_flags
label_desc: Use image node_id 4 for calling the TestCase obj's underlying member method code with example usage: obj._create_placeholders_from_shapes(shapes, dtypes, sparse_tensors) and returns: placeholders