class_docstr: Creates a constant Tensor or (nested) tuple of Tensors that
  contains a constant value.
  
  Args:
      output_size: Size of output **excluding** the batch dimension. For
          example, set `output_size` to `dim` to generate output of
          shape `[batch_size, dim]`.
          Can be an `int`, a tuple of `int`, a Tensorshape, or a tuple of
          TensorShapes.
          For example, to transform inputs to have decoder state size, set
          `output_size=decoder.state_size`.
      hparams (dict, optional): Hyperparameters. Missing
          hyperparamerter will be set to default values. See
          :meth:`default_hparams` for the hyperparameter sturcture and
          default values.
  
  This connector does not have trainable parameters.
  See :meth:`_build` for the inputs and outputs of the connector.
  
  Example:
  
      .. code-block:: python
  
          connector = Connector(cell.state_size)
          zero_state = connector(batch_size=64, value=0.)
          one_state = connector(batch_size=64, value=1.)
  
  .. document private functions
  .. automethod:: _build
class_docstr_tok: ["Creates","a","constant","Tensor","or","(","nested",")","tuple","of","Tensors","that","contains","a","constant","value",".","Args",":","output_size",":","Size","of","output","*","*","excluding","*","*","the","batch","dimension",".","For","example",",","set","`","output_size","`","to","`","dim","`","to","generate","output","of","shape","`","[","batch_size",",","dim","]","`",".","Can","be","an","`","int","`",",","a","tuple","of","`","int","`",",","a","Tensorshape",",","or","a","tuple","of","TensorShapes",".","For","example",",","to","transform","inputs","to","have","decoder","state","size",",","set","`","output_size=decoder.state_size","`",".","hparams","(","dict",",","optional",")",":","Hyperparameters",".","Missing","hyperparamerter","will","be","set","to","default","values",".","See",":","meth",":","`","default_hparams","`","for","the","hyperparameter","sturcture","and","default","values",".","This","connector","does","not","have","trainable","parameters",".","See",":","meth",":","`","_build","`","for","the","inputs","and","outputs","of","the","connector",".","Example",":","..","code-block",":",":","python","connector","=","Connector","(","cell.state_size",")","zero_state","=","connector","(","batch_size=64",",","value=0",".",")","one_state","=","connector","(","batch_size=64",",","value=1",".",")","..","document","private","functions","..","automethod",":",":","_build"]
docstr: Creates output tensor(s) that has the given value.
  
  Args:
      batch_size: An `int` or `int` scalar Tensor, the batch size.
      value (optional): A scalar, the value that
          the output tensor(s) has. If `None`, "value" in :attr:`hparams`
          is used.
  
  Returns:
      A (structure of) tensor whose structure is the same as
      :attr:`output_size`, with value speicified by
      `value` or :attr:`hparams`.
docstr_tok: ["Creates","output","tensor","(","s",")","that","has","the","given","value",".","Args",":","batch_size",":","An","`","int","`","or","`","int","`","scalar","Tensor",",","the","batch","size",".","value","(","optional",")",":","A","scalar",",","the","value","that","the","output","tensor","(","s",")","has",".","If","`","None","`",",","``","value","''","in",":","attr",":","`","hparams","`","is","used",".","Returns",":","A","(","structure","of",")","tensor","whose","structure","is","the","same","as",":","attr",":","`","output_size","`",",","with","value","speicified","by","`","value","`","or",":","attr",":","`","hparams","`","."]
code: def _build(self, batch_size, value=None):
      """Creates output tensor(s) that has the given value.
  
      Args:
          batch_size: An `int` or `int` scalar Tensor, the batch size.
          value (optional): A scalar, the value that
              the output tensor(s) has. If `None`, "value" in :attr:`hparams`
              is used.
  
      Returns:
          A (structure of) tensor whose structure is the same as
          :attr:`output_size`, with value speicified by
          `value` or :attr:`hparams`.
      """
      value_ = value
      if value_ is None:
          value_ = self.hparams.value
      output = nest.map_structure(
          lambda x: tf.constant(value_, shape=[batch_size, x]),
          self._output_size,
      )
  
      self._built = True
  
      return output
  
imports: import numpy
  import tensorflow
  from tensorflow import distributions
  from tensorflow.python.util import nest
  from texar.tf.modules.connectors.connector_base import ConnectorBase
  from texar.tf.core import layers
  from texar.tf.utils.utils import get_function, check_or_get_instance
label_desc: Use image node_id 3 for calling the ConstantConnector obj's underlying member method code with example usage: obj._build(batch_size, value) and returns: output