parameters: (tensor)
return_statement: return tensor
docstring: Assert `tensor` is 0-D, of type `tf.int32` or `tf.int64`.
  
    Args:
      tensor: Tensor to test.
    Returns:
      `tensor`, for chaining.
    Raises:
      ValueError: if `tensor` is not 0-D, of type `tf.int32` or `tf.int64`.
docstring_summary: Assert `tensor` is 0-D, of type `tf.int32` or `tf.int64`.
docstring_tokens: Assert tensor is 0 - D of type tf . int32 or tf . int64 .
function: def assert_scalar_int(tensor):
    """Assert `tensor` is 0-D, of type `tf.int32` or `tf.int64`.
  
    Args:
      tensor: Tensor to test.
    Returns:
      `tensor`, for chaining.
    Raises:
      ValueError: if `tensor` is not 0-D, of type `tf.int32` or `tf.int64`.
    """
    data_type = tensor.dtype
    if data_type.base_dtype not in [dtypes.int32, dtypes.int64]:
      raise ValueError('Unexpected type %s for %s.' % (data_type, tensor.name))
    shape = tensor.get_shape()
    if shape.ndims != 0:
      raise ValueError('Unexpected shape %s for %s.' % (shape, tensor.name))
    return tensor
function_tokens: def assert_scalar_int ( tensor ) : data_type = tensor . dtype if data_type . base_dtype not in [ dtypes . int32 , dtypes . int64 ] : raise ValueError ( 'Unexpected type %s for %s.' % ( data_type , tensor . name ) ) shape = tensor . get_shape ( ) if shape . ndims != 0 : raise ValueError ( 'Unexpected shape %s for %s.' % ( shape , tensor . name ) ) return tensor